Logging config overriding in OPS

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Logging config overriding in OPS

ozenzin
We've faced with logging config override in OPS. The situation is following: we have Geronimo+Tomcat 1.0 where several web-apps deployed as well as some other ourcomponents. Each of them makes logging, though they all share log4j-1.2.8.jar provided by container. So we have commented out the property "oxf.log4j-config" in propetries.xml where ops is embedded. Though we skip the log4j config we still have our logging detuned. Debug show that there is unconditional reset of Root Logger in org.orbeon.oxf.util.LoggerFactory.initBasicLogger() during OPSServlet init. The stack is following:

org.orbeon.oxf.servlet.OPSServlet:59
org.orbeon.oxf.servlet.OPSServletDelegate:69
org.orbeon.oxf.webapp.WebAppContext:72

BTW - the same debug show that the lines 66-73 in the LoggerFactory do not execute (i.e. logging is skipped).

I'v tried different approaches for OPS config, but only comment out the code within LoggerFactory.initBasicLogger() helped to turn our logging as defined in Geronimo server-log4j.properties.

It seems not clean - to reset Root Logger with some "default" config with expectation that proper logging config will follow shortly (see WebAppContext). Maybe it should check if "oxf.log4j-config" property is present or alternatively - use another specific Logger for output msgs before/if logging is initialized in OPS.

Pls advise wher I'm wrong or correct as currently we have to hack your code to get proper logging.

Thank you,
Oleg



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Logging config overriding in OPS

Alessandro  Vernet
Administrator
Oleg,

I am reluctant to modify this code as I know that our log4j code got
pretty tricky with time and what we have there is the result of a
number of iterations with a few of application servers.

But what you suggests sounds reasonable. What about you implement the
changes you are talking about. If it works in your setup, send us the
files you have modified. We'll test the changes in a couple of other
environments and if everything works fine we'll check the changes in
the code repository.

Alex

On 5/10/06, [hidden email] <[hidden email]> wrote:

> We've faced with logging config override in OPS. The situation is following: we have Geronimo+Tomcat 1.0 where several web-apps deployed as well as some other ourcomponents. Each of them makes logging, though they all share log4j-1.2.8.jar provided by container. So we have commented out the property "oxf.log4j-config" in propetries.xml where ops is embedded. Though we skip the log4j config we still have our logging detuned. Debug show that there is unconditional reset of Root Logger in org.orbeon.oxf.util.LoggerFactory.initBasicLogger() during OPSServlet init. The stack is following:
>
> org.orbeon.oxf.servlet.OPSServlet:59
> org.orbeon.oxf.servlet.OPSServletDelegate:69
> org.orbeon.oxf.webapp.WebAppContext:72
>
> BTW - the same debug show that the lines 66-73 in the LoggerFactory do not execute (i.e. logging is skipped).
>
> I'v tried different approaches for OPS config, but only comment out the code within LoggerFactory.initBasicLogger() helped to turn our logging as defined in Geronimo server-log4j.properties.
>
> It seems not clean - to reset Root Logger with some "default" config with expectation that proper logging config will follow shortly (see WebAppContext). Maybe it should check if "oxf.log4j-config" property is present or alternatively - use another specific Logger for output msgs before/if logging is initialized in OPS.
>
> Pls advise wher I'm wrong or correct as currently we have to hack your code to get proper logging.
>
> Thank you,
> Oleg
>
>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>

--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet