[jboss-as7-dev] Logging Subsystem Changes

Jaikiran Pai jpai at redhat.com
Tue Nov 27 10:11:23 EST 2012


On Tuesday 27 November 2012 05:23 AM, Brian Stansberry wrote:
>> Not writing out expression could be an issue with paths more than
>> anything. This could be an issue if you copy a configuration (from
>> production to dev for example) and expect ${jboss.server.log.dir} to be
>> resolved. Since the full path is written out, it's likely on initial
>> boot without any changes the log will be written to the production
>> directory and file.
>>
>> I can't think of a solid way to fix this issue. Writing out the
>> expression to the logging.properties file wouldn't always work as the
>> system property may not be set yet.
>>
>> There will no longer be a boot.log. On the initial boot of a fresh
>> install the console is the only stream written to until the logging
>> subsystem kicks in which will then write to the server.log as usual.
>>
> To clarify a bit, AIUI, the reason there is only console logging on
> *initial* boot is because the logging.properties we ship only has a
> CONSOLE appender. Then during that initial boot the logging subsystem
> kicks in and the server.log appender gets processed. The result is that
> gets written to logging.properties, so the *next* boot of the system
> that appender will be in logging.properties and the server.log file will
> be written to from the very beginning of boot.

A couple of things that I'm wondering about the logging.properties 
related changes are:

1) Until now, I don't think many users are even aware that there's a 
logging.properties being used and for them the logging subsystem is the 
sole representation of the logging configurations. I know the 
documentation[1] does talk about the logging.properties, but I still 
don't think many users are concerned/aware about it. I might not have 
understood the full implications of the changes yet, but it looks like 
we are exposing the presence of the logging.properties to the users 
which can have very confusing results. For example, if the logging 
subsystem is configured to have an appender which logs to ${foo}/bar.log 
then:

     a) During first run the user starts the server with 
-Dfoo=/home/run1 then the logs correctly get written out to 
/home/run1/bar.log
     b) User restarts the server, this time with -Dfoo=/home/run2 then 
the *initial few logs* till logging subsystem kicks in, will be written 
out to /home/run1/bar.log and then the rest of the logs to 
/home/run2/bar.log? Did I understand this correctly?

2) Why are we overwriting the logging.properties with logging subsystem 
configurations? Or more precisely, isn't the logging.properties and the 
logging subsystem configurations meant for 2 different things?Further to 
this, are we writing out all the information available in the logging 
subsystem to the logging.properties - like the various user configured 
appenders and even logging profiles?

[1] 
https://docs.jboss.org/author/display/AS71/Admin+Guide#AdminGuide-Logging

-Jaikiran


More information about the jboss-as7-dev mailing list