Thanks Romain!

I eventually settled on the following:

system.properties:
        java.util.logging.manager = java.util.logging.LogManager

logging.properties:
        
        OpenEJB.level = INFO

        handlers = org.apache.openejb.log.FileHandler, 
java.util.logging.ConsoleHandler

        java.util.logging.SimpleFormatter.format=[%1$tF %1$tT|%4$s][%2$s]: 
%5$s%6$s%n

        java.util.logging.ConsoleHandler.level=ALL
        
java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter

        org.apache.openejb.log.FileHandler.directory = logs
        org.apache.openejb.log.FileHandler.prefix = openejb.
        org.apache.openejb.log.FileHandler.level = ALL
        org.apache.openejb.log.FileHandler.rotatable = true
        org.apache.openejb.log.FileHandler.formatter = 
java.util.logging.SimpleFormatter


This outputs the log in a nice format to both a console and logs/ files. I 
simply change the OpenEJB.level to something different when needed.

Thanks again!

Chris Christo

---
Twitter: https://twitter.com/ChrisChristo7
Tumblr: http://chrischristo7.tumblr.com
LinkedIn: http://uk.linkedin.com/in/chrischristo
GitHub: https://github.com/ChrisChristo


On 3 Jun 2013, at 17:29, Romain Manni-Bucau <[email protected]> wrote:

> here a sample for tomee
> https://gist.github.com/rmannibucau/d0f669c710ff174160b6
> 
> for openejb and using openejb properties use logging.level.FOO instead of
> FOO.level.
> 
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> *Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> *Github: https://github.com/rmannibucau*
> 
> 
> 
> 2013/6/3 Chris.Christo <[email protected]>
> 
>> Hi Romain,
>> 
>> So how would I apply these logging properties using JUL?
>> 
>> log4j.rootLogger                   = fatal,C
>> log4j.category.OpenEJB             = debug
>> log4j.category.OpenEJB.options     = debug
>> log4j.category.OpenEJB.server      = debug
>> log4j.category.OpenEJB.startup     = debug
>> log4j.category.OpenEJB.startup.service = debug
>> log4j.category.OpenEJB.startup.config = debug
>> log4j.category.OpenEJB.hsql        = debug
>> log4j.category.CORBA-Adapter       = debug
>> log4j.category.Transaction         = debug
>> log4j.category.org.apache.activemq = debug
>> log4j.category.org.apache.geronimo = debug
>> log4j.category.openjpa             = debug
>> log4j.appender.C                   = org.apache.log4j.ConsoleAppender
>> log4j.appender.C.layout            = org.apache.log4j.SimpleLayout
>> 
>> 
>> 
>> Chris
>> 
>> On 3 Jun 2013, at 16:18, Romain Manni-Bucau <[email protected]> wrote:
>> 
>>> Hi,
>>> 
>>> just use JUL configuration
>>> 
>>> *Romain Manni-Bucau*
>>> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
>>> *Blog: **http://rmannibucau.wordpress.com/*<
>> http://rmannibucau.wordpress.com/>
>>> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
>>> *Github: https://github.com/rmannibucau*
>>> 
>>> 
>>> 
>>> 2013/6/3 Chris.Christo <[email protected]>
>>> 
>>>> Isn't there any way to configure the slf4j implementation slf4j-jdk14
>> that
>>>> comes with TomEE/OpenEJB?
>>>> 
>>>> All the documentation points to dropping in the log4j implementation jar
>>>> into lib and then adding various log4j.xxx to your properties.
>>>> 
>>>> 
>>>> 
>>>> Chris
>> 
>> 

Reply via email to