You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by André Carlos <an...@gmail.com> on 2008/09/24 18:54:38 UTC

Log in differents files

Hi,

I'm like make logs of different packages in differents files, but, after try
much not achieve a configuration corret.

please, i need a hand
--------------------------------------------------------
sds
carpe diem
ama sua, ama llulla, ama chella
André Carlos
==============================
NETiqueta:
Ao encaminhar esta mensagem, por favor:
1. Apague o MEU endereço eletrônico;
2. Encaminhe como cópia oculta (CCO; BCC) aos SEUS destinatários.
Obrigado!
Yogi Berra  - "You wouldn't have won if we'd beaten you."

Re: Log in differents files

Posted by André Carlos <an...@gmail.com>.
still does't work, i made the changes and not work

--------------------------------------------------------
sds
carpe diem
ama sua, ama llulla, ama chella
André Carlos
==============================
NETiqueta:
Ao encaminhar esta mensagem, por favor:
1. Apague o MEU endereço eletrônico;
2. Encaminhe como cópia oculta (CCO; BCC) aos SEUS destinatários.
Obrigado!
Joan Rivers  - "If God wanted us to bend over he'd put diamonds on the
floor."

On Wed, Sep 24, 2008 at 16:57, Jacob Kjome <ho...@visi.com> wrote:

> So, you're saying it's still a problem for you even after changing the
> config the way I suggested?  Or are you saying it all works now?
>
> Jake
>
>
> On Wed, 24 Sep 2008 16:53:11 -0300
>
>  "André Carlos" <an...@gmail.com> wrote:
>
>> is this, i had to do one change to send the conf file
>>
>> the correct is: it loggin in A1 e in the Console, but, not logging in A2
>>
>> sorry
>>
>> --------------------------------------------------------
>> sds
>> carpe diem
>> ama sua, ama llulla, ama chella
>> André Carlos
>> ==============================
>> NETiqueta:
>> Ao encaminhar esta mensagem, por favor:
>> 1. Apague o MEU endereço eletrônico;
>> 2. Encaminhe como cópia oculta (CCO; BCC) aos SEUS destinatários.
>> Obrigado!
>> Joan Rivers  - "If God wanted us to bend over he'd put diamonds on the
>> floor."
>>
>> On Wed, Sep 24, 2008 at 16:42, Jacob Kjome <ho...@visi.com> wrote:
>>
>>  You're saying you see logging on the Console but not in the A1 appender
>>> file (${catalina.home}/logs/A1.log)?  That doesn't make much sense.  It's
>>> possible that there is an order, and that you need to place your root
>>> logger
>>> below the appender definitions.  Try that.
>>>
>>> Note that the loggers configured to use your A2 appender looks
>>> misconfigured...
>>>
>>> log4j.logger.br.gov.ba.ssp.sigip.tarefas=DEBUG,A2
>>>  log4j.additivity.com.app.tarefas=false
>>>
>>> Shouldn't that be?...
>>>
>>> log4j.logger.br.gov.ba.ssp.sigip.tarefas=DEBUG,A2
>>>
>>> log4j.additivity.br.gov.ba.ssp.sigip.tarefas=false
>>>
>>>
>>> Jake
>>>
>>>
>>> On Wed, 24 Sep 2008 15:50:35 -0300
>>>
>>>  "André Carlos" <an...@gmail.com> wrote:
>>>
>>>  the log4j write only in first appender, in the second appender it create
>>>> the
>>>> file but dont't write the log
>>>>
>>>>
>>>> log4j.debug=true
>>>> log4j.rootLogger=DEBUG, Console, A1
>>>>
>>>> log4j.appender.Console=org.apache.log4j.ConsoleAppender
>>>> log4j.appender.Console.layout=org.apache.log4j.PatternLayout
>>>> log4j.appender.Console.layout.ConversionPattern=SAGBA - %-2d{dd/MM/yy
>>>> HH:mm}
>>>> [%5p] %c:%L - %m%n
>>>>
>>>> log4j.appender.A1=org.apache.log4j.DailyRollingFileAppender
>>>> log4j.appender.A1.File=${catalina.home}/logs/A1.log
>>>> log4j.appender.A1.DatePattern='.'dd-MM-yyyy'.log'
>>>> log4j.appender.A1.Append=true
>>>> log4j.appender.A1.ImmediateFlush=true:
>>>> log4j.appender.A1.layout=org.apache.log4j.PatternLayout
>>>> log4j.appender.A1.layout.ConversionPattern=A1 - %-2d{dd/MM/yy HH:mm}
>>>> [%5p]
>>>> %c:%L - %m%n
>>>>
>>>> log4j.logger.org.apache.axis=ERROR
>>>> log4j.logger.org.apache.fop=ERROR
>>>> log4j.logger.br.gov.ba.ssp.sigip.tarefas=DEBUG,A2
>>>> log4j.additivity.com.app.tarefas=false
>>>> log4j.logger.org.apache.struts=ERROR
>>>> log4j.logger.org.apache.struts.action=DEBUG
>>>> log4j.logger.org.apache.catalina=ERROR
>>>> log4j.logger.org.apache.jasper=ERROR
>>>> log4j.logger.org.apache.commons=ERROR
>>>> log4j.logger.org.directwebremoting=ERROR
>>>> log4j.logger.org.hibernate=ERROR
>>>> log4j.logger.com.mchange.v2=ERROR
>>>> log4j.logger.com.centrasite.jaxr=ERROR
>>>>
>>>> log4j.logger.com.fw.tamino.xqj=ERROR
>>>> log4j.logger.com.fw.components.integration=DEBUG
>>>> log4j.logger.com.fw.components.auth=INFO
>>>> log4j.logger.com.fw.components.view.tags=INFO
>>>> log4j.logger.com.fw.components.persistence.hibernate.HibernateUtil=INFO
>>>> log4j.logger.com.fw.components.view.tags.BackTag=DEBUG
>>>> log4j.logger.com.fw.components.util.ValueObjectUtil=ERROR
>>>> log4j.logger.com.fw.components.business.entity.AbstractValueObject=INFO
>>>>
>>>> log4j.logger.com.app.operacao.atendimento.proxy.AtendimentoService=ERROR
>>>> log4j.logger.com.app.versao.VersionarPrototypeDecorator=ERROR
>>>>
>>>>
>>>> log4j.logger.com.app.administracao.seguranca.login.controller.action.LoginAction=INFO
>>>>
>>>>
>>>> log4j.logger.com.app.administracao.seguranca.filter.SigipHibernateFilter=INFO
>>>>
>>>>
>>>> log4j.logger.com.app.administracao.auditoria.persistence.hibernate.interceptor=DEBUG
>>>>
>>>>
>>>>
>>>> log4j.appender.A2=org.apache.log4j.DailyRollingFileAppender
>>>> log4j.appender.A2.File=${catalina.home}/logs/A2.log
>>>> log4j.appender.A2.DatePattern='.'dd-MM-yyyy'.log'
>>>> log4j.appender.A2.Append=true
>>>> log4j.appender.A2.ImmediateFlush=true:
>>>> log4j.appender.A2.layout=org.apache.log4j.PatternLayout
>>>> log4j.appender.A2.layout.ConversionPattern=A2 - %-2d{dd/MM/yy HH:mm}
>>>> [%5p]
>>>> %c:%L - %m%n
>>>>
>>>>
>>>>
>>>> --------------------------------------------------------
>>>> sds
>>>> carpe diem
>>>> ama sua, ama llulla, ama chella
>>>> André Carlos
>>>> ==============================
>>>> NETiqueta:
>>>> Ao encaminhar esta mensagem, por favor:
>>>> 1. Apague o MEU endereço eletrônico;
>>>> 2. Encaminhe como cópia oculta (CCO; BCC) aos SEUS destinatários.
>>>> Obrigado!
>>>> Fred Allen  - "What's on your mind, if you will allow the
>>>> overstatement?"
>>>>
>>>> On Wed, Sep 24, 2008 at 15:25, Jacob Kjome <ho...@visi.com> wrote:
>>>>
>>>>  I don't think that the properties config format imposes any particular
>>>>
>>>>> ordering.  What do you mean it isn't working?  what isn't working?
>>>>>  Please
>>>>> post a sample of your config.  You can also start your app with
>>>>> -Dlog4j.debug=true and see if Log4j is even using your config file.
>>>>>  Keep
>>>>> in
>>>>> mind, if log4j.xml is found in the classpath, it will be used in
>>>>> preferenced
>>>>> to log4j.properties when using autoconfiguration.
>>>>>
>>>>> Jake
>>>>>
>>>>>
>>>>> On Wed, 24 Sep 2008 15:12:32 -0300
>>>>>
>>>>>  "André Carlos" <an...@gmail.com> wrote:
>>>>>
>>>>>  Is exactly what i need, but, don't work here. The order what i put the
>>>>>
>>>>>> configs influences the final result?
>>>>>>
>>>>>> --------------------------------------------------------
>>>>>> sds
>>>>>> carpe diem
>>>>>> ama sua, ama llulla, ama chella
>>>>>> André Carlos
>>>>>> ==============================
>>>>>> NETiqueta:
>>>>>> Ao encaminhar esta mensagem, por favor:
>>>>>> 1. Apague o MEU endereço eletrônico;
>>>>>> 2. Encaminhe como cópia oculta (CCO; BCC) aos SEUS destinatários.
>>>>>> Obrigado!
>>>>>> Bill Cosby  - "Always end the name of your child with a vowel, so that
>>>>>> when
>>>>>> you yell the name will carry."
>>>>>>
>>>>>> On Wed, Sep 24, 2008 at 14:54, Jacob Kjome <ho...@visi.com> wrote:
>>>>>>
>>>>>>  It would be helpful to see your config.  But I can imagine what you
>>>>>> might
>>>>>>
>>>>>>  be missing.  You need to look into the concept of additivity.  By
>>>>>>> default
>>>>>>> it
>>>>>>> is "true".  This means that a child inherits the appenders and levels
>>>>>>> of
>>>>>>> parents.  You want to set this to false.  For instance, the following
>>>>>>> config
>>>>>>> sets up defaults for all packages using the root logger with a
>>>>>>> console
>>>>>>> appender and a level of WARN.  All loggers inherit this, except for
>>>>>>> the
>>>>>>> "org.mypackage" logger and all children of this logger, which will
>>>>>>> log
>>>>>>> at
>>>>>>> the INFO level to the mypackageAppender.  The key to doing this is
>>>>>>> the
>>>>>>> line
>>>>>>> "log4j.additivity.org.mypackage=false".
>>>>>>>
>>>>>>>
>>>>>>> log4j.appender.defaultAppender=org.apache.log4j.ConsoleAppender
>>>>>>> log4j.appender.defaultAppender.layout=org.apache.log4j.PatternLayout
>>>>>>> log4j.appender.defaultAppender.layout.ConversionPattern=%-5p
>>>>>>> [%-8.8t]:
>>>>>>> %39.39c %-6r - %m%n
>>>>>>>
>>>>>>> log4j.appender.mypackageAppender=org.apache.log4j.RollingFileAppender
>>>>>>> log4j.appender.mypackageAppender.File=${log.dir}/mypackage.log
>>>>>>> log4j.appender.mypackageAppender.MaxFileSize=1000KB
>>>>>>> log4j.appender.mypackageAppender.MaxBackupIndex=5
>>>>>>>
>>>>>>> log4j.appender.mypackageAppender.layout=org.apache.log4j.PatternLayout
>>>>>>> log4j.appender.mypackageAppender.layout.ConversionPattern=%-5p
>>>>>>> [%-8.8t]:
>>>>>>> %39.39c %-6r - %m%n
>>>>>>>
>>>>>>> log4j.logger.org.mypackage=INFO, mypackageAppender
>>>>>>> log4j.additivity.org.mypackage=false
>>>>>>>
>>>>>>> log4j.rootLogger=WARN, defaultAppender
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Jake
>>>>>>>
>>>>>>>
>>>>>>> On Wed, 24 Sep 2008 13:54:38 -0300
>>>>>>>  "André Carlos" <an...@gmail.com> wrote:
>>>>>>>
>>>>>>>  Hi,
>>>>>>>
>>>>>>>
>>>>>>>> I'm like make logs of different packages in differents files, but,
>>>>>>>> after
>>>>>>>> try
>>>>>>>> much not achieve a configuration corret.
>>>>>>>>
>>>>>>>> please, i need a hand
>>>>>>>> --------------------------------------------------------
>>>>>>>> sds
>>>>>>>> carpe diem
>>>>>>>> ama sua, ama llulla, ama chella
>>>>>>>> André Carlos
>>>>>>>> ==============================
>>>>>>>> NETiqueta:
>>>>>>>> Ao encaminhar esta mensagem, por favor:
>>>>>>>> 1. Apague o MEU endereço eletrônico;
>>>>>>>> 2. Encaminhe como cópia oculta (CCO; BCC) aos SEUS destinatários.
>>>>>>>> Obrigado!
>>>>>>>> Yogi Berra  - "You wouldn't have won if we'd beaten you."
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>>>>>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>>>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>>>>
>>>>>
>>>>>
>>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>>
>>>
>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

Re: Log in differents files

Posted by Jacob Kjome <ho...@visi.com>.
So, you're saying it's still a problem for you even after changing the config 
the way I suggested?  Or are you saying it all works now?

Jake


On Wed, 24 Sep 2008 16:53:11 -0300
  "André Carlos" <an...@gmail.com> wrote:
> is this, i had to do one change to send the conf file
> 
> the correct is: it loggin in A1 e in the Console, but, not logging in A2
> 
> sorry
> 
> --------------------------------------------------------
> sds
> carpe diem
> ama sua, ama llulla, ama chella
> André Carlos
> ==============================
> NETiqueta:
> Ao encaminhar esta mensagem, por favor:
> 1. Apague o MEU endereço eletrônico;
> 2. Encaminhe como cópia oculta (CCO; BCC) aos SEUS destinatários.
> Obrigado!
> Joan Rivers  - "If God wanted us to bend over he'd put diamonds on the
> floor."
> 
> On Wed, Sep 24, 2008 at 16:42, Jacob Kjome <ho...@visi.com> wrote:
> 
>> You're saying you see logging on the Console but not in the A1 appender
>> file (${catalina.home}/logs/A1.log)?  That doesn't make much sense.  It's
>> possible that there is an order, and that you need to place your root logger
>> below the appender definitions.  Try that.
>>
>> Note that the loggers configured to use your A2 appender looks
>> misconfigured...
>>
>> log4j.logger.br.gov.ba.ssp.sigip.tarefas=DEBUG,A2
>>  log4j.additivity.com.app.tarefas=false
>>
>> Shouldn't that be?...
>>
>> log4j.logger.br.gov.ba.ssp.sigip.tarefas=DEBUG,A2
>>
>> log4j.additivity.br.gov.ba.ssp.sigip.tarefas=false
>>
>>
>> Jake
>>
>>
>> On Wed, 24 Sep 2008 15:50:35 -0300
>>
>>  "André Carlos" <an...@gmail.com> wrote:
>>
>>> the log4j write only in first appender, in the second appender it create
>>> the
>>> file but dont't write the log
>>>
>>>
>>> log4j.debug=true
>>> log4j.rootLogger=DEBUG, Console, A1
>>>
>>> log4j.appender.Console=org.apache.log4j.ConsoleAppender
>>> log4j.appender.Console.layout=org.apache.log4j.PatternLayout
>>> log4j.appender.Console.layout.ConversionPattern=SAGBA - %-2d{dd/MM/yy
>>> HH:mm}
>>> [%5p] %c:%L - %m%n
>>>
>>> log4j.appender.A1=org.apache.log4j.DailyRollingFileAppender
>>> log4j.appender.A1.File=${catalina.home}/logs/A1.log
>>> log4j.appender.A1.DatePattern='.'dd-MM-yyyy'.log'
>>> log4j.appender.A1.Append=true
>>> log4j.appender.A1.ImmediateFlush=true:
>>> log4j.appender.A1.layout=org.apache.log4j.PatternLayout
>>> log4j.appender.A1.layout.ConversionPattern=A1 - %-2d{dd/MM/yy HH:mm} [%5p]
>>> %c:%L - %m%n
>>>
>>> log4j.logger.org.apache.axis=ERROR
>>> log4j.logger.org.apache.fop=ERROR
>>> log4j.logger.br.gov.ba.ssp.sigip.tarefas=DEBUG,A2
>>> log4j.additivity.com.app.tarefas=false
>>> log4j.logger.org.apache.struts=ERROR
>>> log4j.logger.org.apache.struts.action=DEBUG
>>> log4j.logger.org.apache.catalina=ERROR
>>> log4j.logger.org.apache.jasper=ERROR
>>> log4j.logger.org.apache.commons=ERROR
>>> log4j.logger.org.directwebremoting=ERROR
>>> log4j.logger.org.hibernate=ERROR
>>> log4j.logger.com.mchange.v2=ERROR
>>> log4j.logger.com.centrasite.jaxr=ERROR
>>>
>>> log4j.logger.com.fw.tamino.xqj=ERROR
>>> log4j.logger.com.fw.components.integration=DEBUG
>>> log4j.logger.com.fw.components.auth=INFO
>>> log4j.logger.com.fw.components.view.tags=INFO
>>> log4j.logger.com.fw.components.persistence.hibernate.HibernateUtil=INFO
>>> log4j.logger.com.fw.components.view.tags.BackTag=DEBUG
>>> log4j.logger.com.fw.components.util.ValueObjectUtil=ERROR
>>> log4j.logger.com.fw.components.business.entity.AbstractValueObject=INFO
>>>
>>> log4j.logger.com.app.operacao.atendimento.proxy.AtendimentoService=ERROR
>>> log4j.logger.com.app.versao.VersionarPrototypeDecorator=ERROR
>>>
>>> log4j.logger.com.app.administracao.seguranca.login.controller.action.LoginAction=INFO
>>>
>>> log4j.logger.com.app.administracao.seguranca.filter.SigipHibernateFilter=INFO
>>>
>>> log4j.logger.com.app.administracao.auditoria.persistence.hibernate.interceptor=DEBUG
>>>
>>>
>>>
>>> log4j.appender.A2=org.apache.log4j.DailyRollingFileAppender
>>> log4j.appender.A2.File=${catalina.home}/logs/A2.log
>>> log4j.appender.A2.DatePattern='.'dd-MM-yyyy'.log'
>>> log4j.appender.A2.Append=true
>>> log4j.appender.A2.ImmediateFlush=true:
>>> log4j.appender.A2.layout=org.apache.log4j.PatternLayout
>>> log4j.appender.A2.layout.ConversionPattern=A2 - %-2d{dd/MM/yy HH:mm} [%5p]
>>> %c:%L - %m%n
>>>
>>>
>>>
>>> --------------------------------------------------------
>>> sds
>>> carpe diem
>>> ama sua, ama llulla, ama chella
>>> André Carlos
>>> ==============================
>>> NETiqueta:
>>> Ao encaminhar esta mensagem, por favor:
>>> 1. Apague o MEU endereço eletrônico;
>>> 2. Encaminhe como cópia oculta (CCO; BCC) aos SEUS destinatários.
>>> Obrigado!
>>> Fred Allen  - "What's on your mind, if you will allow the overstatement?"
>>>
>>> On Wed, Sep 24, 2008 at 15:25, Jacob Kjome <ho...@visi.com> wrote:
>>>
>>>  I don't think that the properties config format imposes any particular
>>>> ordering.  What do you mean it isn't working?  what isn't working?
>>>>  Please
>>>> post a sample of your config.  You can also start your app with
>>>> -Dlog4j.debug=true and see if Log4j is even using your config file.  Keep
>>>> in
>>>> mind, if log4j.xml is found in the classpath, it will be used in
>>>> preferenced
>>>> to log4j.properties when using autoconfiguration.
>>>>
>>>> Jake
>>>>
>>>>
>>>> On Wed, 24 Sep 2008 15:12:32 -0300
>>>>
>>>>  "André Carlos" <an...@gmail.com> wrote:
>>>>
>>>>  Is exactly what i need, but, don't work here. The order what i put the
>>>>> configs influences the final result?
>>>>>
>>>>> --------------------------------------------------------
>>>>> sds
>>>>> carpe diem
>>>>> ama sua, ama llulla, ama chella
>>>>> André Carlos
>>>>> ==============================
>>>>> NETiqueta:
>>>>> Ao encaminhar esta mensagem, por favor:
>>>>> 1. Apague o MEU endereço eletrônico;
>>>>> 2. Encaminhe como cópia oculta (CCO; BCC) aos SEUS destinatários.
>>>>> Obrigado!
>>>>> Bill Cosby  - "Always end the name of your child with a vowel, so that
>>>>> when
>>>>> you yell the name will carry."
>>>>>
>>>>> On Wed, Sep 24, 2008 at 14:54, Jacob Kjome <ho...@visi.com> wrote:
>>>>>
>>>>>  It would be helpful to see your config.  But I can imagine what you
>>>>> might
>>>>>
>>>>>> be missing.  You need to look into the concept of additivity.  By
>>>>>> default
>>>>>> it
>>>>>> is "true".  This means that a child inherits the appenders and levels
>>>>>> of
>>>>>> parents.  You want to set this to false.  For instance, the following
>>>>>> config
>>>>>> sets up defaults for all packages using the root logger with a console
>>>>>> appender and a level of WARN.  All loggers inherit this, except for the
>>>>>> "org.mypackage" logger and all children of this logger, which will log
>>>>>> at
>>>>>> the INFO level to the mypackageAppender.  The key to doing this is the
>>>>>> line
>>>>>> "log4j.additivity.org.mypackage=false".
>>>>>>
>>>>>>
>>>>>> log4j.appender.defaultAppender=org.apache.log4j.ConsoleAppender
>>>>>> log4j.appender.defaultAppender.layout=org.apache.log4j.PatternLayout
>>>>>> log4j.appender.defaultAppender.layout.ConversionPattern=%-5p [%-8.8t]:
>>>>>> %39.39c %-6r - %m%n
>>>>>>
>>>>>> log4j.appender.mypackageAppender=org.apache.log4j.RollingFileAppender
>>>>>> log4j.appender.mypackageAppender.File=${log.dir}/mypackage.log
>>>>>> log4j.appender.mypackageAppender.MaxFileSize=1000KB
>>>>>> log4j.appender.mypackageAppender.MaxBackupIndex=5
>>>>>> log4j.appender.mypackageAppender.layout=org.apache.log4j.PatternLayout
>>>>>> log4j.appender.mypackageAppender.layout.ConversionPattern=%-5p
>>>>>> [%-8.8t]:
>>>>>> %39.39c %-6r - %m%n
>>>>>>
>>>>>> log4j.logger.org.mypackage=INFO, mypackageAppender
>>>>>> log4j.additivity.org.mypackage=false
>>>>>>
>>>>>> log4j.rootLogger=WARN, defaultAppender
>>>>>>
>>>>>>
>>>>>>
>>>>>> Jake
>>>>>>
>>>>>>
>>>>>> On Wed, 24 Sep 2008 13:54:38 -0300
>>>>>>  "André Carlos" <an...@gmail.com> wrote:
>>>>>>
>>>>>>  Hi,
>>>>>>
>>>>>>>
>>>>>>> I'm like make logs of different packages in differents files, but,
>>>>>>> after
>>>>>>> try
>>>>>>> much not achieve a configuration corret.
>>>>>>>
>>>>>>> please, i need a hand
>>>>>>> --------------------------------------------------------
>>>>>>> sds
>>>>>>> carpe diem
>>>>>>> ama sua, ama llulla, ama chella
>>>>>>> André Carlos
>>>>>>> ==============================
>>>>>>> NETiqueta:
>>>>>>> Ao encaminhar esta mensagem, por favor:
>>>>>>> 1. Apague o MEU endereço eletrônico;
>>>>>>> 2. Encaminhe como cópia oculta (CCO; BCC) aos SEUS destinatários.
>>>>>>> Obrigado!
>>>>>>> Yogi Berra  - "You wouldn't have won if we'd beaten you."
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>>>>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>>>
>>>>
>>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Log in differents files

Posted by André Carlos <an...@gmail.com>.
is this, i had to do one change to send the conf file

the correct is: it loggin in A1 e in the Console, but, not logging in A2

sorry

--------------------------------------------------------
sds
carpe diem
ama sua, ama llulla, ama chella
André Carlos
==============================
NETiqueta:
Ao encaminhar esta mensagem, por favor:
1. Apague o MEU endereço eletrônico;
2. Encaminhe como cópia oculta (CCO; BCC) aos SEUS destinatários.
Obrigado!
Joan Rivers  - "If God wanted us to bend over he'd put diamonds on the
floor."

On Wed, Sep 24, 2008 at 16:42, Jacob Kjome <ho...@visi.com> wrote:

> You're saying you see logging on the Console but not in the A1 appender
> file (${catalina.home}/logs/A1.log)?  That doesn't make much sense.  It's
> possible that there is an order, and that you need to place your root logger
> below the appender definitions.  Try that.
>
> Note that the loggers configured to use your A2 appender looks
> misconfigured...
>
> log4j.logger.br.gov.ba.ssp.sigip.tarefas=DEBUG,A2
>  log4j.additivity.com.app.tarefas=false
>
> Shouldn't that be?...
>
> log4j.logger.br.gov.ba.ssp.sigip.tarefas=DEBUG,A2
>
> log4j.additivity.br.gov.ba.ssp.sigip.tarefas=false
>
>
> Jake
>
>
> On Wed, 24 Sep 2008 15:50:35 -0300
>
>  "André Carlos" <an...@gmail.com> wrote:
>
>> the log4j write only in first appender, in the second appender it create
>> the
>> file but dont't write the log
>>
>>
>> log4j.debug=true
>> log4j.rootLogger=DEBUG, Console, A1
>>
>> log4j.appender.Console=org.apache.log4j.ConsoleAppender
>> log4j.appender.Console.layout=org.apache.log4j.PatternLayout
>> log4j.appender.Console.layout.ConversionPattern=SAGBA - %-2d{dd/MM/yy
>> HH:mm}
>> [%5p] %c:%L - %m%n
>>
>> log4j.appender.A1=org.apache.log4j.DailyRollingFileAppender
>> log4j.appender.A1.File=${catalina.home}/logs/A1.log
>> log4j.appender.A1.DatePattern='.'dd-MM-yyyy'.log'
>> log4j.appender.A1.Append=true
>> log4j.appender.A1.ImmediateFlush=true:
>> log4j.appender.A1.layout=org.apache.log4j.PatternLayout
>> log4j.appender.A1.layout.ConversionPattern=A1 - %-2d{dd/MM/yy HH:mm} [%5p]
>> %c:%L - %m%n
>>
>> log4j.logger.org.apache.axis=ERROR
>> log4j.logger.org.apache.fop=ERROR
>> log4j.logger.br.gov.ba.ssp.sigip.tarefas=DEBUG,A2
>> log4j.additivity.com.app.tarefas=false
>> log4j.logger.org.apache.struts=ERROR
>> log4j.logger.org.apache.struts.action=DEBUG
>> log4j.logger.org.apache.catalina=ERROR
>> log4j.logger.org.apache.jasper=ERROR
>> log4j.logger.org.apache.commons=ERROR
>> log4j.logger.org.directwebremoting=ERROR
>> log4j.logger.org.hibernate=ERROR
>> log4j.logger.com.mchange.v2=ERROR
>> log4j.logger.com.centrasite.jaxr=ERROR
>>
>> log4j.logger.com.fw.tamino.xqj=ERROR
>> log4j.logger.com.fw.components.integration=DEBUG
>> log4j.logger.com.fw.components.auth=INFO
>> log4j.logger.com.fw.components.view.tags=INFO
>> log4j.logger.com.fw.components.persistence.hibernate.HibernateUtil=INFO
>> log4j.logger.com.fw.components.view.tags.BackTag=DEBUG
>> log4j.logger.com.fw.components.util.ValueObjectUtil=ERROR
>> log4j.logger.com.fw.components.business.entity.AbstractValueObject=INFO
>>
>> log4j.logger.com.app.operacao.atendimento.proxy.AtendimentoService=ERROR
>> log4j.logger.com.app.versao.VersionarPrototypeDecorator=ERROR
>>
>> log4j.logger.com.app.administracao.seguranca.login.controller.action.LoginAction=INFO
>>
>> log4j.logger.com.app.administracao.seguranca.filter.SigipHibernateFilter=INFO
>>
>> log4j.logger.com.app.administracao.auditoria.persistence.hibernate.interceptor=DEBUG
>>
>>
>>
>> log4j.appender.A2=org.apache.log4j.DailyRollingFileAppender
>> log4j.appender.A2.File=${catalina.home}/logs/A2.log
>> log4j.appender.A2.DatePattern='.'dd-MM-yyyy'.log'
>> log4j.appender.A2.Append=true
>> log4j.appender.A2.ImmediateFlush=true:
>> log4j.appender.A2.layout=org.apache.log4j.PatternLayout
>> log4j.appender.A2.layout.ConversionPattern=A2 - %-2d{dd/MM/yy HH:mm} [%5p]
>> %c:%L - %m%n
>>
>>
>>
>> --------------------------------------------------------
>> sds
>> carpe diem
>> ama sua, ama llulla, ama chella
>> André Carlos
>> ==============================
>> NETiqueta:
>> Ao encaminhar esta mensagem, por favor:
>> 1. Apague o MEU endereço eletrônico;
>> 2. Encaminhe como cópia oculta (CCO; BCC) aos SEUS destinatários.
>> Obrigado!
>> Fred Allen  - "What's on your mind, if you will allow the overstatement?"
>>
>> On Wed, Sep 24, 2008 at 15:25, Jacob Kjome <ho...@visi.com> wrote:
>>
>>  I don't think that the properties config format imposes any particular
>>> ordering.  What do you mean it isn't working?  what isn't working?
>>>  Please
>>> post a sample of your config.  You can also start your app with
>>> -Dlog4j.debug=true and see if Log4j is even using your config file.  Keep
>>> in
>>> mind, if log4j.xml is found in the classpath, it will be used in
>>> preferenced
>>> to log4j.properties when using autoconfiguration.
>>>
>>> Jake
>>>
>>>
>>> On Wed, 24 Sep 2008 15:12:32 -0300
>>>
>>>  "André Carlos" <an...@gmail.com> wrote:
>>>
>>>  Is exactly what i need, but, don't work here. The order what i put the
>>>> configs influences the final result?
>>>>
>>>> --------------------------------------------------------
>>>> sds
>>>> carpe diem
>>>> ama sua, ama llulla, ama chella
>>>> André Carlos
>>>> ==============================
>>>> NETiqueta:
>>>> Ao encaminhar esta mensagem, por favor:
>>>> 1. Apague o MEU endereço eletrônico;
>>>> 2. Encaminhe como cópia oculta (CCO; BCC) aos SEUS destinatários.
>>>> Obrigado!
>>>> Bill Cosby  - "Always end the name of your child with a vowel, so that
>>>> when
>>>> you yell the name will carry."
>>>>
>>>> On Wed, Sep 24, 2008 at 14:54, Jacob Kjome <ho...@visi.com> wrote:
>>>>
>>>>  It would be helpful to see your config.  But I can imagine what you
>>>> might
>>>>
>>>>> be missing.  You need to look into the concept of additivity.  By
>>>>> default
>>>>> it
>>>>> is "true".  This means that a child inherits the appenders and levels
>>>>> of
>>>>> parents.  You want to set this to false.  For instance, the following
>>>>> config
>>>>> sets up defaults for all packages using the root logger with a console
>>>>> appender and a level of WARN.  All loggers inherit this, except for the
>>>>> "org.mypackage" logger and all children of this logger, which will log
>>>>> at
>>>>> the INFO level to the mypackageAppender.  The key to doing this is the
>>>>> line
>>>>> "log4j.additivity.org.mypackage=false".
>>>>>
>>>>>
>>>>> log4j.appender.defaultAppender=org.apache.log4j.ConsoleAppender
>>>>> log4j.appender.defaultAppender.layout=org.apache.log4j.PatternLayout
>>>>> log4j.appender.defaultAppender.layout.ConversionPattern=%-5p [%-8.8t]:
>>>>> %39.39c %-6r - %m%n
>>>>>
>>>>> log4j.appender.mypackageAppender=org.apache.log4j.RollingFileAppender
>>>>> log4j.appender.mypackageAppender.File=${log.dir}/mypackage.log
>>>>> log4j.appender.mypackageAppender.MaxFileSize=1000KB
>>>>> log4j.appender.mypackageAppender.MaxBackupIndex=5
>>>>> log4j.appender.mypackageAppender.layout=org.apache.log4j.PatternLayout
>>>>> log4j.appender.mypackageAppender.layout.ConversionPattern=%-5p
>>>>> [%-8.8t]:
>>>>> %39.39c %-6r - %m%n
>>>>>
>>>>> log4j.logger.org.mypackage=INFO, mypackageAppender
>>>>> log4j.additivity.org.mypackage=false
>>>>>
>>>>> log4j.rootLogger=WARN, defaultAppender
>>>>>
>>>>>
>>>>>
>>>>> Jake
>>>>>
>>>>>
>>>>> On Wed, 24 Sep 2008 13:54:38 -0300
>>>>>  "André Carlos" <an...@gmail.com> wrote:
>>>>>
>>>>>  Hi,
>>>>>
>>>>>>
>>>>>> I'm like make logs of different packages in differents files, but,
>>>>>> after
>>>>>> try
>>>>>> much not achieve a configuration corret.
>>>>>>
>>>>>> please, i need a hand
>>>>>> --------------------------------------------------------
>>>>>> sds
>>>>>> carpe diem
>>>>>> ama sua, ama llulla, ama chella
>>>>>> André Carlos
>>>>>> ==============================
>>>>>> NETiqueta:
>>>>>> Ao encaminhar esta mensagem, por favor:
>>>>>> 1. Apague o MEU endereço eletrônico;
>>>>>> 2. Encaminhe como cópia oculta (CCO; BCC) aos SEUS destinatários.
>>>>>> Obrigado!
>>>>>> Yogi Berra  - "You wouldn't have won if we'd beaten you."
>>>>>>
>>>>>>
>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>>>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>>>>
>>>>>
>>>>>
>>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>>
>>>
>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

Re: Log in differents files

Posted by Jacob Kjome <ho...@visi.com>.
André Carlos wrote:
> I correct, but not worked
> 
> I will try to explain more, I want what it logged certain package in A1 and
> others in A2, and the Console logged the union of A1 and A2

How do you expect this...

log4j.logger.br.gov.ba.ssp.sigip.tarefas=DEBUG,A2
log4j.additivity.br.gov.ba.ssp.sigip.tarefas=false

...to log to the A1 Appender?????

Your root logger is set to log to A1 and Console with A2 applied to the logger
"br.gov.ba.ssp.sigip.tarefas" (and its children).  Your expectations appear to be
wrong, not Log4j.  Here's what I expect from your config...

All logging goes to A1 and Console except for "br.gov.ba.ssp.sigip.tarefas" (and
child loggers), which will log to the A2 appender.  Logging output in A1 and
Console will be identical and exclusive to any logging that takes place in A2.

If you want "br.gov.ba.ssp.sigip.tarefas" and children to go to both A1 and
Console (and not A2, as you previously stated), then you should declare this....

log4j.logger.br.gov.ba.ssp.sigip.tarefas=DEBUG, A1, Console
log4j.additivity.br.gov.ba.ssp.sigip.tarefas=false


Also, I'm not clear on whether you want specific packages to go to A2 or just all
packages other than the ones you want to go to A1.  I'm going to assume the latter
and say you want your root logger to be...

log4j.rootLogger=DEBUG, A2, Console



Jake

> 
> 
> --------------------------------------------------------
> sds
> carpe diem
> ama sua, ama llulla, ama chella
> André Carlos
> ==============================
> NETiqueta:
> Ao encaminhar esta mensagem, por favor:
> 1. Apague o MEU endereço eletrônico;
> 2. Encaminhe como cópia oculta (CCO; BCC) aos SEUS destinatários.
> Obrigado!
> Yogi Berra  - "You wouldn't have won if we'd beaten you."
> 
> On Wed, Sep 24, 2008 at 17:07, Jacob Kjome <ho...@visi.com> wrote:
> 
>> No, A2 logging will *not* end up in the Console because the additivity for
>> the logger that uses A2 is false.  It will *only* appear in A2.  A1 and
>> Console should get identical logging.  And you never addressed my question
>> of whether you corrected your config for the "br.gov.ba.ssp.sigip.tarefas
>> logger".
>>
>> Jake
>>
>>
>> On Wed, 24 Sep 2008 17:02:24 -0300
>>  "André Carlos" <an...@gmail.com> wrote:
>>
>>> yes, i'm sure that this is logged, and this content should be logged A2,
>>> the
>>> rest shold be logged in A1, and A1 and A2 should be logged in Console
>>> --------------------------------------------------------
>>> sds
>>> carpe diem
>>> ama sua, ama llulla, ama chella
>>> André Carlos
>>> ==============================
>>> NETiqueta:
>>> Ao encaminhar esta mensagem, por favor:
>>> 1. Apague o MEU endereço eletrônico;
>>> 2. Encaminhe como cópia oculta (CCO; BCC) aos SEUS destinatários.
>>> Obrigado!
>>> Fred Allen  - "What's on your mind, if you will allow the overstatement?"
>>>
>>> On Wed, Sep 24, 2008 at 16:56, Curt Arnold <ca...@apache.org> wrote:
>>>
>>>
>>>> On Sep 24, 2008, at 2:42 PM, Jacob Kjome wrote:
>>>>
>>>>  You're saying you see logging on the Console but not in the A1 appender
>>>>
>>>>> file (${catalina.home}/logs/A1.log)?  That doesn't make much sense.
>>>>>  It's
>>>>> possible that there is an order, and that you need to place your root
>>>>> logger
>>>>> below the appender definitions.  Try that.
>>>>>
>>>>> Note that the loggers configured to use your A2 appender looks
>>>>> misconfigured...
>>>>>
>>>>> log4j.logger.br.gov.ba.ssp.sigip.tarefas=DEBUG,A2
>>>>> log4j.additivity.com.app.tarefas=false
>>>>>
>>>>> Shouldn't that be?...
>>>>>
>>>>> log4j.logger.br.gov.ba.ssp.sigip.tarefas=DEBUG,A2
>>>>>
>>>>> log4j.additivity.br.gov.ba.ssp.sigip.tarefas=false
>>>>>
>>>>>
>>>>> Jake
>>>>>
>>>>>
>>>>>  You would add the second line if you did not want messages logged on
>>>> "br.gov...tarefas" also logged to A1.log.
>>>>
>>>> Are you sure that you actually logged anything on "br.gov...tarefas"?
>>>>  That
>>>> is did A1.log contain some entries what that logger name in them?  Having
>>>> an
>>>> empty A2.log file would be as expected if you never logged anything to
>>>> that
>>>> particular logger.
>>>>
>>>> Your ImmediateFlush lines appear to have extraneous trailing colons.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>>>
>>>>
>>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>
>>
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Log in differents files

Posted by André Carlos <an...@gmail.com>.
I correct, but not worked

I will try to explain more, I want what it logged certain package in A1 and
others in A2, and the Console logged the union of A1 and A2


--------------------------------------------------------
sds
carpe diem
ama sua, ama llulla, ama chella
André Carlos
==============================
NETiqueta:
Ao encaminhar esta mensagem, por favor:
1. Apague o MEU endereço eletrônico;
2. Encaminhe como cópia oculta (CCO; BCC) aos SEUS destinatários.
Obrigado!
Yogi Berra  - "You wouldn't have won if we'd beaten you."

On Wed, Sep 24, 2008 at 17:07, Jacob Kjome <ho...@visi.com> wrote:

>
> No, A2 logging will *not* end up in the Console because the additivity for
> the logger that uses A2 is false.  It will *only* appear in A2.  A1 and
> Console should get identical logging.  And you never addressed my question
> of whether you corrected your config for the "br.gov.ba.ssp.sigip.tarefas
> logger".
>
> Jake
>
>
> On Wed, 24 Sep 2008 17:02:24 -0300
>  "André Carlos" <an...@gmail.com> wrote:
>
>> yes, i'm sure that this is logged, and this content should be logged A2,
>> the
>> rest shold be logged in A1, and A1 and A2 should be logged in Console
>> --------------------------------------------------------
>> sds
>> carpe diem
>> ama sua, ama llulla, ama chella
>> André Carlos
>> ==============================
>> NETiqueta:
>> Ao encaminhar esta mensagem, por favor:
>> 1. Apague o MEU endereço eletrônico;
>> 2. Encaminhe como cópia oculta (CCO; BCC) aos SEUS destinatários.
>> Obrigado!
>> Fred Allen  - "What's on your mind, if you will allow the overstatement?"
>>
>> On Wed, Sep 24, 2008 at 16:56, Curt Arnold <ca...@apache.org> wrote:
>>
>>
>>> On Sep 24, 2008, at 2:42 PM, Jacob Kjome wrote:
>>>
>>>  You're saying you see logging on the Console but not in the A1 appender
>>>
>>>> file (${catalina.home}/logs/A1.log)?  That doesn't make much sense.
>>>>  It's
>>>> possible that there is an order, and that you need to place your root
>>>> logger
>>>> below the appender definitions.  Try that.
>>>>
>>>> Note that the loggers configured to use your A2 appender looks
>>>> misconfigured...
>>>>
>>>> log4j.logger.br.gov.ba.ssp.sigip.tarefas=DEBUG,A2
>>>> log4j.additivity.com.app.tarefas=false
>>>>
>>>> Shouldn't that be?...
>>>>
>>>> log4j.logger.br.gov.ba.ssp.sigip.tarefas=DEBUG,A2
>>>>
>>>> log4j.additivity.br.gov.ba.ssp.sigip.tarefas=false
>>>>
>>>>
>>>> Jake
>>>>
>>>>
>>>>  You would add the second line if you did not want messages logged on
>>> "br.gov...tarefas" also logged to A1.log.
>>>
>>> Are you sure that you actually logged anything on "br.gov...tarefas"?
>>>  That
>>> is did A1.log contain some entries what that logger name in them?  Having
>>> an
>>> empty A2.log file would be as expected if you never logged anything to
>>> that
>>> particular logger.
>>>
>>> Your ImmediateFlush lines appear to have extraneous trailing colons.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>>
>>>
>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

Re: Log in differents files

Posted by Jacob Kjome <ho...@visi.com>.
No, A2 logging will *not* end up in the Console because the additivity for the 
logger that uses A2 is false.  It will *only* appear in A2.  A1 and Console 
should get identical logging.  And you never addressed my question of whether 
you corrected your config for the "br.gov.ba.ssp.sigip.tarefas logger".

Jake


On Wed, 24 Sep 2008 17:02:24 -0300
  "André Carlos" <an...@gmail.com> wrote:
> yes, i'm sure that this is logged, and this content should be logged A2, the
> rest shold be logged in A1, and A1 and A2 should be logged in Console
> --------------------------------------------------------
> sds
> carpe diem
> ama sua, ama llulla, ama chella
> André Carlos
> ==============================
> NETiqueta:
> Ao encaminhar esta mensagem, por favor:
> 1. Apague o MEU endereço eletrônico;
> 2. Encaminhe como cópia oculta (CCO; BCC) aos SEUS destinatários.
> Obrigado!
>Fred Allen  - "What's on your mind, if you will allow the overstatement?"
> 
> On Wed, Sep 24, 2008 at 16:56, Curt Arnold <ca...@apache.org> wrote:
> 
>>
>> On Sep 24, 2008, at 2:42 PM, Jacob Kjome wrote:
>>
>>  You're saying you see logging on the Console but not in the A1 appender
>>> file (${catalina.home}/logs/A1.log)?  That doesn't make much sense.  It's
>>> possible that there is an order, and that you need to place your root logger
>>> below the appender definitions.  Try that.
>>>
>>> Note that the loggers configured to use your A2 appender looks
>>> misconfigured...
>>>
>>> log4j.logger.br.gov.ba.ssp.sigip.tarefas=DEBUG,A2
>>> log4j.additivity.com.app.tarefas=false
>>>
>>> Shouldn't that be?...
>>>
>>> log4j.logger.br.gov.ba.ssp.sigip.tarefas=DEBUG,A2
>>>
>>> log4j.additivity.br.gov.ba.ssp.sigip.tarefas=false
>>>
>>>
>>> Jake
>>>
>>>
>> You would add the second line if you did not want messages logged on
>> "br.gov...tarefas" also logged to A1.log.
>>
>> Are you sure that you actually logged anything on "br.gov...tarefas"?  That
>> is did A1.log contain some entries what that logger name in them?  Having an
>> empty A2.log file would be as expected if you never logged anything to that
>> particular logger.
>>
>> Your ImmediateFlush lines appear to have extraneous trailing colons.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Log in differents files

Posted by André Carlos <an...@gmail.com>.
yes, i'm sure that this is logged, and this content should be logged A2, the
rest shold be logged in A1, and A1 and A2 should be logged in Console
--------------------------------------------------------
sds
carpe diem
ama sua, ama llulla, ama chella
André Carlos
==============================
NETiqueta:
Ao encaminhar esta mensagem, por favor:
1. Apague o MEU endereço eletrônico;
2. Encaminhe como cópia oculta (CCO; BCC) aos SEUS destinatários.
Obrigado!
Fred Allen  - "What's on your mind, if you will allow the overstatement?"

On Wed, Sep 24, 2008 at 16:56, Curt Arnold <ca...@apache.org> wrote:

>
> On Sep 24, 2008, at 2:42 PM, Jacob Kjome wrote:
>
>  You're saying you see logging on the Console but not in the A1 appender
>> file (${catalina.home}/logs/A1.log)?  That doesn't make much sense.  It's
>> possible that there is an order, and that you need to place your root logger
>> below the appender definitions.  Try that.
>>
>> Note that the loggers configured to use your A2 appender looks
>> misconfigured...
>>
>> log4j.logger.br.gov.ba.ssp.sigip.tarefas=DEBUG,A2
>> log4j.additivity.com.app.tarefas=false
>>
>> Shouldn't that be?...
>>
>> log4j.logger.br.gov.ba.ssp.sigip.tarefas=DEBUG,A2
>>
>> log4j.additivity.br.gov.ba.ssp.sigip.tarefas=false
>>
>>
>> Jake
>>
>>
> You would add the second line if you did not want messages logged on
> "br.gov...tarefas" also logged to A1.log.
>
> Are you sure that you actually logged anything on "br.gov...tarefas"?  That
> is did A1.log contain some entries what that logger name in them?  Having an
> empty A2.log file would be as expected if you never logged anything to that
> particular logger.
>
> Your ImmediateFlush lines appear to have extraneous trailing colons.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

Re: Log in differents files

Posted by Curt Arnold <ca...@apache.org>.
On Sep 24, 2008, at 2:42 PM, Jacob Kjome wrote:

> You're saying you see logging on the Console but not in the A1  
> appender file (${catalina.home}/logs/A1.log)?  That doesn't make  
> much sense.  It's possible that there is an order, and that you need  
> to place your root logger below the appender definitions.  Try that.
>
> Note that the loggers configured to use your A2 appender looks  
> misconfigured...
>
> log4j.logger.br.gov.ba.ssp.sigip.tarefas=DEBUG,A2
> log4j.additivity.com.app.tarefas=false
>
> Shouldn't that be?...
>
> log4j.logger.br.gov.ba.ssp.sigip.tarefas=DEBUG,A2
>
> log4j.additivity.br.gov.ba.ssp.sigip.tarefas=false
>
>
> Jake
>

You would add the second line if you did not want messages logged on  
"br.gov...tarefas" also logged to A1.log.

Are you sure that you actually logged anything on "br.gov...tarefas"?   
That is did A1.log contain some entries what that logger name in  
them?  Having an empty A2.log file would be as expected if you never  
logged anything to that particular logger.

Your ImmediateFlush lines appear to have extraneous trailing colons.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Log in differents files

Posted by Jacob Kjome <ho...@visi.com>.
You're saying you see logging on the Console but not in the A1 appender file 
(${catalina.home}/logs/A1.log)?  That doesn't make much sense.  It's possible 
that there is an order, and that you need to place your root logger below the 
appender definitions.  Try that.

Note that the loggers configured to use your A2 appender looks 
misconfigured...

log4j.logger.br.gov.ba.ssp.sigip.tarefas=DEBUG,A2
  log4j.additivity.com.app.tarefas=false

Shouldn't that be?...

log4j.logger.br.gov.ba.ssp.sigip.tarefas=DEBUG,A2

log4j.additivity.br.gov.ba.ssp.sigip.tarefas=false


Jake


On Wed, 24 Sep 2008 15:50:35 -0300
  "André Carlos" <an...@gmail.com> wrote:
> the log4j write only in first appender, in the second appender it create the
> file but dont't write the log
> 
> 
> log4j.debug=true
> log4j.rootLogger=DEBUG, Console, A1
> 
> log4j.appender.Console=org.apache.log4j.ConsoleAppender
> log4j.appender.Console.layout=org.apache.log4j.PatternLayout
> log4j.appender.Console.layout.ConversionPattern=SAGBA - %-2d{dd/MM/yy HH:mm}
> [%5p] %c:%L - %m%n
> 
> log4j.appender.A1=org.apache.log4j.DailyRollingFileAppender
> log4j.appender.A1.File=${catalina.home}/logs/A1.log
> log4j.appender.A1.DatePattern='.'dd-MM-yyyy'.log'
> log4j.appender.A1.Append=true
> log4j.appender.A1.ImmediateFlush=true:
> log4j.appender.A1.layout=org.apache.log4j.PatternLayout
> log4j.appender.A1.layout.ConversionPattern=A1 - %-2d{dd/MM/yy HH:mm} [%5p]
> %c:%L - %m%n
> 
> log4j.logger.org.apache.axis=ERROR
> log4j.logger.org.apache.fop=ERROR
> log4j.logger.br.gov.ba.ssp.sigip.tarefas=DEBUG,A2
> log4j.additivity.com.app.tarefas=false
> log4j.logger.org.apache.struts=ERROR
> log4j.logger.org.apache.struts.action=DEBUG
> log4j.logger.org.apache.catalina=ERROR
> log4j.logger.org.apache.jasper=ERROR
> log4j.logger.org.apache.commons=ERROR
> log4j.logger.org.directwebremoting=ERROR
> log4j.logger.org.hibernate=ERROR
> log4j.logger.com.mchange.v2=ERROR
> log4j.logger.com.centrasite.jaxr=ERROR
> 
> log4j.logger.com.fw.tamino.xqj=ERROR
> log4j.logger.com.fw.components.integration=DEBUG
> log4j.logger.com.fw.components.auth=INFO
> log4j.logger.com.fw.components.view.tags=INFO
> log4j.logger.com.fw.components.persistence.hibernate.HibernateUtil=INFO
> log4j.logger.com.fw.components.view.tags.BackTag=DEBUG
> log4j.logger.com.fw.components.util.ValueObjectUtil=ERROR
> log4j.logger.com.fw.components.business.entity.AbstractValueObject=INFO
> 
> log4j.logger.com.app.operacao.atendimento.proxy.AtendimentoService=ERROR
> log4j.logger.com.app.versao.VersionarPrototypeDecorator=ERROR
> log4j.logger.com.app.administracao.seguranca.login.controller.action.LoginAction=INFO
> log4j.logger.com.app.administracao.seguranca.filter.SigipHibernateFilter=INFO
> log4j.logger.com.app.administracao.auditoria.persistence.hibernate.interceptor=DEBUG
> 
> 
> 
> log4j.appender.A2=org.apache.log4j.DailyRollingFileAppender
> log4j.appender.A2.File=${catalina.home}/logs/A2.log
> log4j.appender.A2.DatePattern='.'dd-MM-yyyy'.log'
> log4j.appender.A2.Append=true
> log4j.appender.A2.ImmediateFlush=true:
> log4j.appender.A2.layout=org.apache.log4j.PatternLayout
> log4j.appender.A2.layout.ConversionPattern=A2 - %-2d{dd/MM/yy HH:mm} [%5p]
> %c:%L - %m%n
> 
> 
> 
> --------------------------------------------------------
> sds
> carpe diem
> ama sua, ama llulla, ama chella
> André Carlos
> ==============================
> NETiqueta:
> Ao encaminhar esta mensagem, por favor:
> 1. Apague o MEU endereço eletrônico;
> 2. Encaminhe como cópia oculta (CCO; BCC) aos SEUS destinatários.
> Obrigado!
>Fred Allen  - "What's on your mind, if you will allow the overstatement?"
> 
> On Wed, Sep 24, 2008 at 15:25, Jacob Kjome <ho...@visi.com> wrote:
> 
>> I don't think that the properties config format imposes any particular
>> ordering.  What do you mean it isn't working?  what isn't working?  Please
>> post a sample of your config.  You can also start your app with
>> -Dlog4j.debug=true and see if Log4j is even using your config file.  Keep in
>> mind, if log4j.xml is found in the classpath, it will be used in preferenced
>> to log4j.properties when using autoconfiguration.
>>
>> Jake
>>
>>
>> On Wed, 24 Sep 2008 15:12:32 -0300
>>
>>  "André Carlos" <an...@gmail.com> wrote:
>>
>>> Is exactly what i need, but, don't work here. The order what i put the
>>> configs influences the final result?
>>>
>>> --------------------------------------------------------
>>> sds
>>> carpe diem
>>> ama sua, ama llulla, ama chella
>>> André Carlos
>>> ==============================
>>> NETiqueta:
>>> Ao encaminhar esta mensagem, por favor:
>>> 1. Apague o MEU endereço eletrônico;
>>> 2. Encaminhe como cópia oculta (CCO; BCC) aos SEUS destinatários.
>>> Obrigado!
>>> Bill Cosby  - "Always end the name of your child with a vowel, so that
>>> when
>>> you yell the name will carry."
>>>
>>> On Wed, Sep 24, 2008 at 14:54, Jacob Kjome <ho...@visi.com> wrote:
>>>
>>>  It would be helpful to see your config.  But I can imagine what you might
>>>> be missing.  You need to look into the concept of additivity.  By default
>>>> it
>>>> is "true".  This means that a child inherits the appenders and levels of
>>>> parents.  You want to set this to false.  For instance, the following
>>>> config
>>>> sets up defaults for all packages using the root logger with a console
>>>> appender and a level of WARN.  All loggers inherit this, except for the
>>>> "org.mypackage" logger and all children of this logger, which will log at
>>>> the INFO level to the mypackageAppender.  The key to doing this is the
>>>> line
>>>> "log4j.additivity.org.mypackage=false".
>>>>
>>>>
>>>> log4j.appender.defaultAppender=org.apache.log4j.ConsoleAppender
>>>> log4j.appender.defaultAppender.layout=org.apache.log4j.PatternLayout
>>>> log4j.appender.defaultAppender.layout.ConversionPattern=%-5p [%-8.8t]:
>>>> %39.39c %-6r - %m%n
>>>>
>>>> log4j.appender.mypackageAppender=org.apache.log4j.RollingFileAppender
>>>> log4j.appender.mypackageAppender.File=${log.dir}/mypackage.log
>>>> log4j.appender.mypackageAppender.MaxFileSize=1000KB
>>>> log4j.appender.mypackageAppender.MaxBackupIndex=5
>>>> log4j.appender.mypackageAppender.layout=org.apache.log4j.PatternLayout
>>>> log4j.appender.mypackageAppender.layout.ConversionPattern=%-5p [%-8.8t]:
>>>> %39.39c %-6r - %m%n
>>>>
>>>> log4j.logger.org.mypackage=INFO, mypackageAppender
>>>> log4j.additivity.org.mypackage=false
>>>>
>>>> log4j.rootLogger=WARN, defaultAppender
>>>>
>>>>
>>>>
>>>> Jake
>>>>
>>>>
>>>> On Wed, 24 Sep 2008 13:54:38 -0300
>>>>  "André Carlos" <an...@gmail.com> wrote:
>>>>
>>>>  Hi,
>>>>>
>>>>> I'm like make logs of different packages in differents files, but, after
>>>>> try
>>>>> much not achieve a configuration corret.
>>>>>
>>>>> please, i need a hand
>>>>> --------------------------------------------------------
>>>>> sds
>>>>> carpe diem
>>>>> ama sua, ama llulla, ama chella
>>>>> André Carlos
>>>>> ==============================
>>>>> NETiqueta:
>>>>> Ao encaminhar esta mensagem, por favor:
>>>>> 1. Apague o MEU endereço eletrônico;
>>>>> 2. Encaminhe como cópia oculta (CCO; BCC) aos SEUS destinatários.
>>>>> Obrigado!
>>>>> Yogi Berra  - "You wouldn't have won if we'd beaten you."
>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>>>
>>>>
>>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Log in differents files

Posted by André Carlos <an...@gmail.com>.
the log4j write only in first appender, in the second appender it create the
file but dont't write the log


log4j.debug=true
log4j.rootLogger=DEBUG, Console, A1

log4j.appender.Console=org.apache.log4j.ConsoleAppender
log4j.appender.Console.layout=org.apache.log4j.PatternLayout
log4j.appender.Console.layout.ConversionPattern=SAGBA - %-2d{dd/MM/yy HH:mm}
[%5p] %c:%L - %m%n

log4j.appender.A1=org.apache.log4j.DailyRollingFileAppender
log4j.appender.A1.File=${catalina.home}/logs/A1.log
log4j.appender.A1.DatePattern='.'dd-MM-yyyy'.log'
log4j.appender.A1.Append=true
log4j.appender.A1.ImmediateFlush=true:
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=A1 - %-2d{dd/MM/yy HH:mm} [%5p]
%c:%L - %m%n

log4j.logger.org.apache.axis=ERROR
log4j.logger.org.apache.fop=ERROR
log4j.logger.br.gov.ba.ssp.sigip.tarefas=DEBUG,A2
log4j.additivity.com.app.tarefas=false
log4j.logger.org.apache.struts=ERROR
log4j.logger.org.apache.struts.action=DEBUG
log4j.logger.org.apache.catalina=ERROR
log4j.logger.org.apache.jasper=ERROR
log4j.logger.org.apache.commons=ERROR
log4j.logger.org.directwebremoting=ERROR
log4j.logger.org.hibernate=ERROR
log4j.logger.com.mchange.v2=ERROR
log4j.logger.com.centrasite.jaxr=ERROR

log4j.logger.com.fw.tamino.xqj=ERROR
log4j.logger.com.fw.components.integration=DEBUG
log4j.logger.com.fw.components.auth=INFO
log4j.logger.com.fw.components.view.tags=INFO
log4j.logger.com.fw.components.persistence.hibernate.HibernateUtil=INFO
log4j.logger.com.fw.components.view.tags.BackTag=DEBUG
log4j.logger.com.fw.components.util.ValueObjectUtil=ERROR
log4j.logger.com.fw.components.business.entity.AbstractValueObject=INFO

log4j.logger.com.app.operacao.atendimento.proxy.AtendimentoService=ERROR
log4j.logger.com.app.versao.VersionarPrototypeDecorator=ERROR
log4j.logger.com.app.administracao.seguranca.login.controller.action.LoginAction=INFO
log4j.logger.com.app.administracao.seguranca.filter.SigipHibernateFilter=INFO
log4j.logger.com.app.administracao.auditoria.persistence.hibernate.interceptor=DEBUG



log4j.appender.A2=org.apache.log4j.DailyRollingFileAppender
log4j.appender.A2.File=${catalina.home}/logs/A2.log
log4j.appender.A2.DatePattern='.'dd-MM-yyyy'.log'
log4j.appender.A2.Append=true
log4j.appender.A2.ImmediateFlush=true:
log4j.appender.A2.layout=org.apache.log4j.PatternLayout
log4j.appender.A2.layout.ConversionPattern=A2 - %-2d{dd/MM/yy HH:mm} [%5p]
%c:%L - %m%n



--------------------------------------------------------
sds
carpe diem
ama sua, ama llulla, ama chella
André Carlos
==============================
NETiqueta:
Ao encaminhar esta mensagem, por favor:
1. Apague o MEU endereço eletrônico;
2. Encaminhe como cópia oculta (CCO; BCC) aos SEUS destinatários.
Obrigado!
Fred Allen  - "What's on your mind, if you will allow the overstatement?"

On Wed, Sep 24, 2008 at 15:25, Jacob Kjome <ho...@visi.com> wrote:

> I don't think that the properties config format imposes any particular
> ordering.  What do you mean it isn't working?  what isn't working?  Please
> post a sample of your config.  You can also start your app with
> -Dlog4j.debug=true and see if Log4j is even using your config file.  Keep in
> mind, if log4j.xml is found in the classpath, it will be used in preferenced
> to log4j.properties when using autoconfiguration.
>
> Jake
>
>
> On Wed, 24 Sep 2008 15:12:32 -0300
>
>  "André Carlos" <an...@gmail.com> wrote:
>
>> Is exactly what i need, but, don't work here. The order what i put the
>> configs influences the final result?
>>
>> --------------------------------------------------------
>> sds
>> carpe diem
>> ama sua, ama llulla, ama chella
>> André Carlos
>> ==============================
>> NETiqueta:
>> Ao encaminhar esta mensagem, por favor:
>> 1. Apague o MEU endereço eletrônico;
>> 2. Encaminhe como cópia oculta (CCO; BCC) aos SEUS destinatários.
>> Obrigado!
>> Bill Cosby  - "Always end the name of your child with a vowel, so that
>> when
>> you yell the name will carry."
>>
>> On Wed, Sep 24, 2008 at 14:54, Jacob Kjome <ho...@visi.com> wrote:
>>
>>  It would be helpful to see your config.  But I can imagine what you might
>>> be missing.  You need to look into the concept of additivity.  By default
>>> it
>>> is "true".  This means that a child inherits the appenders and levels of
>>> parents.  You want to set this to false.  For instance, the following
>>> config
>>> sets up defaults for all packages using the root logger with a console
>>> appender and a level of WARN.  All loggers inherit this, except for the
>>> "org.mypackage" logger and all children of this logger, which will log at
>>> the INFO level to the mypackageAppender.  The key to doing this is the
>>> line
>>> "log4j.additivity.org.mypackage=false".
>>>
>>>
>>> log4j.appender.defaultAppender=org.apache.log4j.ConsoleAppender
>>> log4j.appender.defaultAppender.layout=org.apache.log4j.PatternLayout
>>> log4j.appender.defaultAppender.layout.ConversionPattern=%-5p [%-8.8t]:
>>> %39.39c %-6r - %m%n
>>>
>>> log4j.appender.mypackageAppender=org.apache.log4j.RollingFileAppender
>>> log4j.appender.mypackageAppender.File=${log.dir}/mypackage.log
>>> log4j.appender.mypackageAppender.MaxFileSize=1000KB
>>> log4j.appender.mypackageAppender.MaxBackupIndex=5
>>> log4j.appender.mypackageAppender.layout=org.apache.log4j.PatternLayout
>>> log4j.appender.mypackageAppender.layout.ConversionPattern=%-5p [%-8.8t]:
>>> %39.39c %-6r - %m%n
>>>
>>> log4j.logger.org.mypackage=INFO, mypackageAppender
>>> log4j.additivity.org.mypackage=false
>>>
>>> log4j.rootLogger=WARN, defaultAppender
>>>
>>>
>>>
>>> Jake
>>>
>>>
>>> On Wed, 24 Sep 2008 13:54:38 -0300
>>>  "André Carlos" <an...@gmail.com> wrote:
>>>
>>>  Hi,
>>>>
>>>> I'm like make logs of different packages in differents files, but, after
>>>> try
>>>> much not achieve a configuration corret.
>>>>
>>>> please, i need a hand
>>>> --------------------------------------------------------
>>>> sds
>>>> carpe diem
>>>> ama sua, ama llulla, ama chella
>>>> André Carlos
>>>> ==============================
>>>> NETiqueta:
>>>> Ao encaminhar esta mensagem, por favor:
>>>> 1. Apague o MEU endereço eletrônico;
>>>> 2. Encaminhe como cópia oculta (CCO; BCC) aos SEUS destinatários.
>>>> Obrigado!
>>>> Yogi Berra  - "You wouldn't have won if we'd beaten you."
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>>
>>>
>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

Re: Log in differents files

Posted by Jacob Kjome <ho...@visi.com>.
I don't think that the properties config format imposes any particular 
ordering.  What do you mean it isn't working?  what isn't working?  Please 
post a sample of your config.  You can also start your app with 
-Dlog4j.debug=true and see if Log4j is even using your config file.  Keep in 
mind, if log4j.xml is found in the classpath, it will be used in preferenced 
to log4j.properties when using autoconfiguration.

Jake


On Wed, 24 Sep 2008 15:12:32 -0300
  "André Carlos" <an...@gmail.com> wrote:
> Is exactly what i need, but, don't work here. The order what i put the
> configs influences the final result?
> 
> --------------------------------------------------------
> sds
> carpe diem
> ama sua, ama llulla, ama chella
> André Carlos
> ==============================
> NETiqueta:
> Ao encaminhar esta mensagem, por favor:
> 1. Apague o MEU endereço eletrônico;
> 2. Encaminhe como cópia oculta (CCO; BCC) aos SEUS destinatários.
> Obrigado!
> Bill Cosby  - "Always end the name of your child with a vowel, so that when
> you yell the name will carry."
> 
> On Wed, Sep 24, 2008 at 14:54, Jacob Kjome <ho...@visi.com> wrote:
> 
>> It would be helpful to see your config.  But I can imagine what you might
>> be missing.  You need to look into the concept of additivity.  By default it
>> is "true".  This means that a child inherits the appenders and levels of
>> parents.  You want to set this to false.  For instance, the following config
>> sets up defaults for all packages using the root logger with a console
>> appender and a level of WARN.  All loggers inherit this, except for the
>> "org.mypackage" logger and all children of this logger, which will log at
>> the INFO level to the mypackageAppender.  The key to doing this is the line
>> "log4j.additivity.org.mypackage=false".
>>
>>
>> log4j.appender.defaultAppender=org.apache.log4j.ConsoleAppender
>> log4j.appender.defaultAppender.layout=org.apache.log4j.PatternLayout
>> log4j.appender.defaultAppender.layout.ConversionPattern=%-5p [%-8.8t]:
>> %39.39c %-6r - %m%n
>>
>> log4j.appender.mypackageAppender=org.apache.log4j.RollingFileAppender
>> log4j.appender.mypackageAppender.File=${log.dir}/mypackage.log
>> log4j.appender.mypackageAppender.MaxFileSize=1000KB
>> log4j.appender.mypackageAppender.MaxBackupIndex=5
>> log4j.appender.mypackageAppender.layout=org.apache.log4j.PatternLayout
>> log4j.appender.mypackageAppender.layout.ConversionPattern=%-5p [%-8.8t]:
>> %39.39c %-6r - %m%n
>>
>> log4j.logger.org.mypackage=INFO, mypackageAppender
>> log4j.additivity.org.mypackage=false
>>
>> log4j.rootLogger=WARN, defaultAppender
>>
>>
>>
>> Jake
>>
>>
>> On Wed, 24 Sep 2008 13:54:38 -0300
>>  "André Carlos" <an...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I'm like make logs of different packages in differents files, but, after
>>> try
>>> much not achieve a configuration corret.
>>>
>>> please, i need a hand
>>> --------------------------------------------------------
>>> sds
>>> carpe diem
>>> ama sua, ama llulla, ama chella
>>> André Carlos
>>> ==============================
>>> NETiqueta:
>>> Ao encaminhar esta mensagem, por favor:
>>> 1. Apague o MEU endereço eletrônico;
>>> 2. Encaminhe como cópia oculta (CCO; BCC) aos SEUS destinatários.
>>> Obrigado!
>>> Yogi Berra  - "You wouldn't have won if we'd beaten you."
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Log in differents files

Posted by André Carlos <an...@gmail.com>.
Is exactly what i need, but, don't work here. The order what i put the
configs influences the final result?

--------------------------------------------------------
sds
carpe diem
ama sua, ama llulla, ama chella
André Carlos
==============================
NETiqueta:
Ao encaminhar esta mensagem, por favor:
1. Apague o MEU endereço eletrônico;
2. Encaminhe como cópia oculta (CCO; BCC) aos SEUS destinatários.
Obrigado!
Bill Cosby  - "Always end the name of your child with a vowel, so that when
you yell the name will carry."

On Wed, Sep 24, 2008 at 14:54, Jacob Kjome <ho...@visi.com> wrote:

> It would be helpful to see your config.  But I can imagine what you might
> be missing.  You need to look into the concept of additivity.  By default it
> is "true".  This means that a child inherits the appenders and levels of
> parents.  You want to set this to false.  For instance, the following config
> sets up defaults for all packages using the root logger with a console
> appender and a level of WARN.  All loggers inherit this, except for the
> "org.mypackage" logger and all children of this logger, which will log at
> the INFO level to the mypackageAppender.  The key to doing this is the line
> "log4j.additivity.org.mypackage=false".
>
>
> log4j.appender.defaultAppender=org.apache.log4j.ConsoleAppender
> log4j.appender.defaultAppender.layout=org.apache.log4j.PatternLayout
> log4j.appender.defaultAppender.layout.ConversionPattern=%-5p [%-8.8t]:
> %39.39c %-6r - %m%n
>
> log4j.appender.mypackageAppender=org.apache.log4j.RollingFileAppender
> log4j.appender.mypackageAppender.File=${log.dir}/mypackage.log
> log4j.appender.mypackageAppender.MaxFileSize=1000KB
> log4j.appender.mypackageAppender.MaxBackupIndex=5
> log4j.appender.mypackageAppender.layout=org.apache.log4j.PatternLayout
> log4j.appender.mypackageAppender.layout.ConversionPattern=%-5p [%-8.8t]:
> %39.39c %-6r - %m%n
>
> log4j.logger.org.mypackage=INFO, mypackageAppender
> log4j.additivity.org.mypackage=false
>
> log4j.rootLogger=WARN, defaultAppender
>
>
>
> Jake
>
>
> On Wed, 24 Sep 2008 13:54:38 -0300
>  "André Carlos" <an...@gmail.com> wrote:
>
>> Hi,
>>
>> I'm like make logs of different packages in differents files, but, after
>> try
>> much not achieve a configuration corret.
>>
>> please, i need a hand
>> --------------------------------------------------------
>> sds
>> carpe diem
>> ama sua, ama llulla, ama chella
>> André Carlos
>> ==============================
>> NETiqueta:
>> Ao encaminhar esta mensagem, por favor:
>> 1. Apague o MEU endereço eletrônico;
>> 2. Encaminhe como cópia oculta (CCO; BCC) aos SEUS destinatários.
>> Obrigado!
>> Yogi Berra  - "You wouldn't have won if we'd beaten you."
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

Re: Log in differents files

Posted by Jacob Kjome <ho...@visi.com>.
It would be helpful to see your config.  But I can imagine what you might be 
missing.  You need to look into the concept of additivity.  By default it is 
"true".  This means that a child inherits the appenders and levels of 
parents.  You want to set this to false.  For instance, the following config 
sets up defaults for all packages using the root logger with a console 
appender and a level of WARN.  All loggers inherit this, except for the 
"org.mypackage" logger and all children of this logger, which will log at the 
INFO level to the mypackageAppender.  The key to doing this is the line 
"log4j.additivity.org.mypackage=false". 


log4j.appender.defaultAppender=org.apache.log4j.ConsoleAppender
log4j.appender.defaultAppender.layout=org.apache.log4j.PatternLayout
log4j.appender.defaultAppender.layout.ConversionPattern=%-5p [%-8.8t]: %39.39c 
%-6r - %m%n

log4j.appender.mypackageAppender=org.apache.log4j.RollingFileAppender
log4j.appender.mypackageAppender.File=${log.dir}/mypackage.log
log4j.appender.mypackageAppender.MaxFileSize=1000KB
log4j.appender.mypackageAppender.MaxBackupIndex=5
log4j.appender.mypackageAppender.layout=org.apache.log4j.PatternLayout
log4j.appender.mypackageAppender.layout.ConversionPattern=%-5p [%-8.8t]: 
%39.39c %-6r - %m%n

log4j.logger.org.mypackage=INFO, mypackageAppender
log4j.additivity.org.mypackage=false

log4j.rootLogger=WARN, defaultAppender



Jake

On Wed, 24 Sep 2008 13:54:38 -0300
  "André Carlos" <an...@gmail.com> wrote:
> Hi,
> 
> I'm like make logs of different packages in differents files, but, after try
> much not achieve a configuration corret.
> 
> please, i need a hand
> --------------------------------------------------------
> sds
> carpe diem
> ama sua, ama llulla, ama chella
> André Carlos
> ==============================
> NETiqueta:
> Ao encaminhar esta mensagem, por favor:
> 1. Apague o MEU endereço eletrônico;
> 2. Encaminhe como cópia oculta (CCO; BCC) aos SEUS destinatários.
> Obrigado!
> Yogi Berra  - "You wouldn't have won if we'd beaten you."


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org