karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré (JIRA) <j...@apache.org>
Subject [jira] [Commented] (KARAF-2381) The shell log:set command not as documented
Date Thu, 21 Nov 2013 13:59:35 GMT

    [ https://issues.apache.org/jira/browse/KARAF-2381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13828958#comment-13828958
] 

Jean-Baptiste Onofré commented on KARAF-2381:
---------------------------------------------

Actually, I think there is a misunderstanding of the usage of the DEFAULT log level. It's
not related to the storage, like reloading the "original" log level from etc/org.ops4j.pax.logging.cfg
file.

The purpose of the DEFAULT log level is to assign the log level of the parent logger to a
logger (up to the rootLogger). That's why, for instance, it's not possible to do log:set DEFAULT
on the rootLogger as it doesn't have a parent.

Let me illustrate. Assuming we have:
rootLogger=INFO
org.apache.karaf=ERROR
org.apache.karaf.admin=ERROR

If I do:
log:set DEBUG org.apache.karaf.admin
I have:
rootLogger=INFO
org.apache.karaf=ERROR
org.apache.karaf.admin=DEBUG

Now, I do:
log:set DEFAULT org.apache.karaf.admin
it takes the log level from the parent, so org.apache.karaf. So I will have:
rootLogger=INFO
org.apache.karaf=ERROR
org.apache.karaf.admin=ERROR

Now, I do:
log:set DEBUG org.apache.karaf
I have:
rootLogger=INFO
org.apache.karaf=DEBUG
org.apache.karaf.admin=ERROR

Now, I do:
log:set DEFAULT org.apache.karaf
It takes the log level from the parent, so rootLogger. So I have:
rootLogger=INFO
org.apache.karaf=INFO
org.apache.karaf.admin=ERROR

Now, if I do:
log:set DEFAULT org.apache.karaf.admin
It takes the log level from the parent, so org.apache.karaf. So I have:
rootLogger=INFO
org.apache.karaf=INFO
org.apache.karaf.admin=INFO

I'm updating the documentation to explain/describe it and I'm checking that it actually acts
like this.

> The shell log:set command not as documented
> -------------------------------------------
>
>                 Key: KARAF-2381
>                 URL: https://issues.apache.org/jira/browse/KARAF-2381
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-shell
>    Affects Versions: 2.3.1
>         Environment: Windows 7 + JDK7, RedHat 5 Linux + JDK6
>            Reporter: Opher Shachar
>            Assignee: Jean-Baptiste Onofré
>             Fix For: 2.4.0, 3.0.0, 2.3.4
>
>
> Running the shell's *log:set _LogLevel_ _PackageName_* command makes the change *persistent*
in contrary to the [documentation|http://repo1.maven.org/maven2/org/apache/karaf/manual/2.3.1/manual-2.3.1.html#ConsoleLogCommands].
> On the flip side *log:set _DEFAULT_ _PackageName_* is _not_ persisted.
> So, the *log:set* command should either:
> * make *log:set _DEFAULT_ _PackageName_* persisted (and fix the documentation), or
> * make *log:set _LogLevel_ _PackageName_* _not_ persistent (as documented).



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message