You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by "David Johnson (JIRA)" <no...@atlassian.com> on 2007/07/23 18:27:31 UTC

[Roller-JIRA] Created: (ROL-1491) Make log4j configurable via roller-custom.properties

Make log4j configurable via roller-custom.properties
----------------------------------------------------

                 Key: ROL-1491
                 URL: http://opensource.atlassian.com/projects/roller/browse/ROL-1491
             Project: Roller
          Issue Type: Improvement
          Components: Configuration & Settings
            Reporter: David Johnson
            Assignee: Roller Unassigned
             Fix For: 4.0


With 4.0 we are almost able to configure Roller entirely without modifying the contents of the Roller WAR, but there is one significant "hole" and that is log4j.properties.

First, we've got the string ${catalina.home} hardcoded into log4j.properties. Log4j expands that using the catalina.home system property, but that is not available on other app servers. To change that you have to bust open the WAR and modify log4.properties.

Second, if a users needs to adjust logging levels they also have to bust open the WAR.

We can solve these problems very easily by adding the Log4j properties to roller.properties. That way, folks can use roller-custom.properties to configure Log4j. At startup time we pull the Log4j from RollerConfig (so they get the roller-custom.properties override values) and then feed them to Log4j PropertiesConfigurator.configure() method.

   http://logging.apache.org/log4j/docs/api/org/apache/log4j/PropertyConfigurator.html


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

        

[Roller-JIRA] Resolved: (ROL-1491) Make log4j configurable via roller-custom.properties

Posted by "David Johnson (JIRA)" <no...@atlassian.com>.
     [ http://opensource.atlassian.com/projects/roller/browse/ROL-1491?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Johnson resolved ROL-1491.
--------------------------------

    Resolution: Fixed

Fixed in trunk for 4.0

URL: http://svn.apache.org/viewvc?view=rev&rev=559831
Log:
Implementing ROL-1491 - make log4j configurable via roller-custom.properties

> Make log4j configurable via roller-custom.properties
> ----------------------------------------------------
>
>                 Key: ROL-1491
>                 URL: http://opensource.atlassian.com/projects/roller/browse/ROL-1491
>             Project: Roller
>          Issue Type: Improvement
>          Components: Configuration & Settings
>            Reporter: David Johnson
>            Assignee: David Johnson
>             Fix For: 4.0
>
>
> With 4.0 we are almost able to configure Roller entirely without modifying the contents of the Roller WAR, but there is one significant "hole" and that is log4j.properties.
> First, we've got the string ${catalina.home} hardcoded into log4j.properties. Log4j expands that using the catalina.home system property, but that is not available on other app servers. To change that you have to bust open the WAR and modify log4.properties.
> Second, if a users needs to adjust logging levels they also have to bust open the WAR.
> We can solve these problems very easily by adding the Log4j properties to roller.properties. That way, folks can use roller-custom.properties to configure Log4j. At startup time we pull the Log4j from RollerConfig (so they get the roller-custom.properties override values) and then feed them to Log4j PropertiesConfigurator.configure() method.
>    http://logging.apache.org/log4j/docs/api/org/apache/log4j/PropertyConfigurator.html

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

        

[Roller-JIRA] Commented: (ROL-1491) Make log4j configurable via roller-custom.properties

Posted by "Allen Gilliland (JIRA)" <no...@atlassian.com>.
    [ http://opensource.atlassian.com/projects/roller/browse/ROL-1491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_13903 ] 

Allen Gilliland commented on ROL-1491:
--------------------------------------

very nice.  i love that idea.

taking things one step further, it would be really great if we allowed for runtime control over logging levels so that if something seemed to be broken that the site admin could turn DEBUG logging on for some classes to see what's happening, then turn it off when they are done.

> Make log4j configurable via roller-custom.properties
> ----------------------------------------------------
>
>                 Key: ROL-1491
>                 URL: http://opensource.atlassian.com/projects/roller/browse/ROL-1491
>             Project: Roller
>          Issue Type: Improvement
>          Components: Configuration & Settings
>            Reporter: David Johnson
>            Assignee: Roller Unassigned
>             Fix For: 4.0
>
>
> With 4.0 we are almost able to configure Roller entirely without modifying the contents of the Roller WAR, but there is one significant "hole" and that is log4j.properties.
> First, we've got the string ${catalina.home} hardcoded into log4j.properties. Log4j expands that using the catalina.home system property, but that is not available on other app servers. To change that you have to bust open the WAR and modify log4.properties.
> Second, if a users needs to adjust logging levels they also have to bust open the WAR.
> We can solve these problems very easily by adding the Log4j properties to roller.properties. That way, folks can use roller-custom.properties to configure Log4j. At startup time we pull the Log4j from RollerConfig (so they get the roller-custom.properties override values) and then feed them to Log4j PropertiesConfigurator.configure() method.
>    http://logging.apache.org/log4j/docs/api/org/apache/log4j/PropertyConfigurator.html

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

        

[Roller-JIRA] Assigned: (ROL-1491) Make log4j configurable via roller-custom.properties

Posted by "David Johnson (JIRA)" <no...@atlassian.com>.
     [ http://opensource.atlassian.com/projects/roller/browse/ROL-1491?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Johnson reassigned ROL-1491:
----------------------------------

    Assignee: David Johnson  (was: Roller Unassigned)

> Make log4j configurable via roller-custom.properties
> ----------------------------------------------------
>
>                 Key: ROL-1491
>                 URL: http://opensource.atlassian.com/projects/roller/browse/ROL-1491
>             Project: Roller
>          Issue Type: Improvement
>          Components: Configuration & Settings
>            Reporter: David Johnson
>            Assignee: David Johnson
>             Fix For: 4.0
>
>
> With 4.0 we are almost able to configure Roller entirely without modifying the contents of the Roller WAR, but there is one significant "hole" and that is log4j.properties.
> First, we've got the string ${catalina.home} hardcoded into log4j.properties. Log4j expands that using the catalina.home system property, but that is not available on other app servers. To change that you have to bust open the WAR and modify log4.properties.
> Second, if a users needs to adjust logging levels they also have to bust open the WAR.
> We can solve these problems very easily by adding the Log4j properties to roller.properties. That way, folks can use roller-custom.properties to configure Log4j. At startup time we pull the Log4j from RollerConfig (so they get the roller-custom.properties override values) and then feed them to Log4j PropertiesConfigurator.configure() method.
>    http://logging.apache.org/log4j/docs/api/org/apache/log4j/PropertyConfigurator.html

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

        

[Roller-JIRA] Commented: (ROL-1491) Make log4j configurable via roller-custom.properties

Posted by "David Johnson (JIRA)" <no...@atlassian.com>.
    [ http://opensource.atlassian.com/projects/roller/browse/ROL-1491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_13941 ] 

David Johnson commented on ROL-1491:
------------------------------------

See also:

URL: http://svn.apache.org/viewvc?view=rev&rev=560240
Log:
Better fix for ROL-1491, now init logging in WebloggerConfig. Seems to work well and typically only one message will hit System.out before logging gets configured.

> Make log4j configurable via roller-custom.properties
> ----------------------------------------------------
>
>                 Key: ROL-1491
>                 URL: http://opensource.atlassian.com/projects/roller/browse/ROL-1491
>             Project: Roller
>          Issue Type: Improvement
>          Components: Configuration & Settings
>            Reporter: David Johnson
>            Assignee: David Johnson
>             Fix For: 4.0
>
>
> With 4.0 we are almost able to configure Roller entirely without modifying the contents of the Roller WAR, but there is one significant "hole" and that is log4j.properties.
> First, we've got the string ${catalina.home} hardcoded into log4j.properties. Log4j expands that using the catalina.home system property, but that is not available on other app servers. To change that you have to bust open the WAR and modify log4.properties.
> Second, if a users needs to adjust logging levels they also have to bust open the WAR.
> We can solve these problems very easily by adding the Log4j properties to roller.properties. That way, folks can use roller-custom.properties to configure Log4j. At startup time we pull the Log4j from RollerConfig (so they get the roller-custom.properties override values) and then feed them to Log4j PropertiesConfigurator.configure() method.
>    http://logging.apache.org/log4j/docs/api/org/apache/log4j/PropertyConfigurator.html

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