Less verbose in log when mistyped commands at INFO level
--------------------------------------------------------

                 Key: KARAF-1013
                 URL: https://issues.apache.org/jira/browse/KARAF-1013
             Project: Karaf
          Issue Type: Improvement
          Components: karaf-shell
    Affects Versions: 2.2.2
            Reporter: Claus Ibsen
            Priority: Minor


If you mistype a command, then you get a verbose stracktrace in the logs at 
INFO level
{code}
13:22:22,785 | INFO  | l Console Thread | Console                          | 37 
- org.apache.karaf.shell.console - 2.2.2.fuse-02-06 | Exception caught while 
executing command
org.apache.felix.gogo.runtime.CommandNotFoundException: Command not found: 
osgi:header
        at 
org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:471)[37:org.apache.karaf.shell.console:2.2.2.fuse-02-06]
        at 
org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:400)[37:org.apache.karaf.shell.console:2.2.2.fuse-02-06]
        at 
org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[37:org.apache.karaf.shell.console:2.2.2.fuse-02-06]
        at 
org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[37:org.apache.karaf.shell.console:2.2.2.fuse-02-06]
        at 
org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[37:org.apache.karaf.shell.console:2.2.2.fuse-02-06]
        at 
org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)[37:org.apache.karaf.shell.console:2.2.2.fuse-02-06]
        at 
org.apache.karaf.shell.console.jline.Console.run(Console.java:240)[37:org.apache.karaf.shell.console:2.2.2.fuse-02-06]
        at java.lang.Thread.run(Thread.java:680)[:1.6.0_26]
{code}

I would prefer if this was less verbose by default. And that strack traces is 
only included at DEBUG level etc.

This is the case for CommandNotFoundException, and possible other exceptions 
where we don't need the stacktrace to make the logs verbose.

Also if people check the logs, then they spot stacktraces, and may think that 
its serious problems. Which this of course is not.
Maybe only log this at DEBUG level all together. As the end users gets reported 
on the shell about the unknown command.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to