Return-Path: X-Original-To: apmail-karaf-issues-archive@minotaur.apache.org Delivered-To: apmail-karaf-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A0BA2F0AE for ; Fri, 5 Apr 2013 15:07:16 +0000 (UTC) Received: (qmail 68881 invoked by uid 500); 5 Apr 2013 15:07:16 -0000 Delivered-To: apmail-karaf-issues-archive@karaf.apache.org Received: (qmail 68856 invoked by uid 500); 5 Apr 2013 15:07:16 -0000 Mailing-List: contact issues-help@karaf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@karaf.apache.org Delivered-To: mailing list issues@karaf.apache.org Received: (qmail 68847 invoked by uid 99); 5 Apr 2013 15:07:16 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Apr 2013 15:07:16 +0000 Date: Fri, 5 Apr 2013 15:07:16 +0000 (UTC) From: =?utf-8?Q?Jean-Baptiste_Onofr=C3=A9_=28JIRA=29?= To: issues@karaf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (KARAF-2234) Thrown Exception in shell commands should be logged as ERROR MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/KARAF-2234?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Jean-Baptiste Onofr=C3=A9 resolved KARAF-2234. ----------------------------------------- Resolution: Fixed =20 > Thrown Exception in shell commands should be logged as ERROR > ------------------------------------------------------------ > > Key: KARAF-2234 > URL: https://issues.apache.org/jira/browse/KARAF-2234 > Project: Karaf > Issue Type: Bug > Components: karaf-shell > Affects Versions: 2.3.1 > Environment: Karaf > Karaf version 2.3.1 > Karaf home /home/rudi/git/bippo-commerce5/karaf_cintal= ama > Karaf base /home/rudi/git/bippo-commerce5/karaf_cintal= ama > OSGi Framework org.apache.felix.framework - 4.0.3 > JVM > Java Virtual Machine OpenJDK 64-Bit Server VM version 23.7-b01 > Version 1.7.0_15 > Vendor Oracle Corporation > Uptime 4 minutes > Total compile time 21.973 seconds > Threads > Live threads 121 > Daemon threads 98 > Peak 152 > Total started 201 > Memory > Current heap size 118,052 kbytes > Maximum heap size 466,048 kbytes > Committed heap size 140,544 kbytes > Pending objects 0 > Garbage collector Name =3D 'PS Scavenge', Collections =3D 64,= Time =3D 0.406 seconds > Garbage collector Name =3D 'PS MarkSweep', Collections =3D 1,= Time =3D 0.053 seconds > Classes > Current classes loaded 12,803 > Total classes loaded 12,803 > Total classes unloaded 0 > Operating system > Name Linux version 3.5.0-25-generic > Architecture amd64 > Processors 8 > Reporter: Hendy Irawan > Assignee: Jean-Baptiste Onofr=C3=A9 > Labels: regression, shell > Fix For: 2.3.2, 2.4.0, 3.0.0 > > > If I remember correctly, the behavior in 2.3.0 was logging exceptions as = ERROR. But for some reason, in 2.3.1 it is INFO. This makes it much harder = to see/filter it in a flood of log messages. > Example log: > {code} > 2013-03-12 17:29:49,784 | INFO | l Console Thread | Console = | araf.shell.console.jline.Console 198 | 14 - org.apache.kara= f.shell.console - 2.3.1 | Exception caught while executing command > java.lang.NullPointerException > at id.co.bippo.salesorder.shell.hand.SalesOrderAddCommand.updateS= tockInventory(SalesOrderAddCommand.java:172)[302:id.co.bippo.salesorder.she= ll:5.0.0.SNAPSHOT] > at id.co.bippo.salesorder.shell.hand.SalesOrderAddCommand.doExecu= te(SalesOrderAddCommand.java:152)[302:id.co.bippo.salesorder.shell:5.0.0.SN= APSHOT] > at org.apache.karaf.shell.console.OsgiCommandSupport.execute(Osgi= CommandSupport.java:38)[14:org.apache.karaf.shell.console:2.3.1] > at org.soluvas.commons.shell.TenantCommandSupport.execute(TenantC= ommandSupport.java:55)[272:org.soluvas.commons:2.0.0.SNAPSHOT] > at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(A= bstractCommand.java:35)[14:org.apache.karaf.shell.console:2.3.1] > at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProx= y.java:78)[14:org.apache.karaf.shell.console:2.3.1] > at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:= 474)[14:org.apache.karaf.shell.console:2.3.1] > at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure= .java:400)[14:org.apache.karaf.shell.console:2.3.1] > at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[14:org.a= pache.karaf.shell.console:2.3.1] > at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183= )[14:org.apache.karaf.shell.console:2.3.1] > at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120= )[14:org.apache.karaf.shell.console:2.3.1] > at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(Comma= ndSessionImpl.java:89)[14:org.apache.karaf.shell.console:2.3.1] > at org.apache.karaf.shell.console.jline.Console.run(Console.java:= 174)[14:org.apache.karaf.shell.console:2.3.1] > at java.lang.Thread.run(Thread.java:722)[:1.7.0_15] > {code} > BTW I use Lilith during development, and it has a nice feature of showing= error logs in big red color, so it's very easy to spot. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs For more information on JIRA, see: http://www.atlassian.com/software/jira