Expose server name as a System property so it can be used in log4j messages
---------------------------------------------------------------------------

                 Key: MAGNOLIA-2840
                 URL: http://jira.magnolia-cms.com/browse/MAGNOLIA-2840
             Project: Magnolia
          Issue Type: Improvement
    Affects Versions: 4.1
            Reporter: Fabrizio Giustina
            Assignee: Fabrizio Giustina
            Priority: Trivial
             Fix For: 4.1.1


Sometimes is useful to have the server name in log4j log messages. In the 
default log4j configuration we already use the ${server} variable (snippet from 
log4j.xml):

{noformat}
      <param name="ConversionPattern" value="[${server}] %-5p %d{dd.MM.yyyy 
HH:mm:ss} %c %F(%M:%L) - %m%n" />
      <param name="Header"
        value="%n
===================================%n
Magnolia%n
Version: ${pom.version}%n
Server: ${server}%n
Url: %X{requesturi}%n
Userid: %X{userid}%n
Number of occurrences: %o%n
===================================%n
        " />
{noformat}


"pom.version" is replaced by maven, "requesturi" and "userid" are set by a 
filter, but "server" needs to be set as a system property in order to work. 
It's safe to set it since it can't differ also if more webapps are running on 
the same jvm. 



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to