Upd: link to ticket https://issues.apache.org/jira/browse/IGNITE-4863

On Fri, Mar 24, 2017 at 6:47 PM, Andrey Mashenkov <
andrey.mashen...@gmail.com> wrote:

> Crossposting to dev:
>
> For now, all is ok if ConsoleAppender for RootLogger is configured by user.
> Otherwise, we try to add ConsoleAppender when logger is created. Once
> ConsoleAppender added then rootLogger logging level set to INFO without any
> checks.
> If ConsoleLogger auto-creation is disabled by user via "
> *IGNITE_CONSOLE_APPENDER*=*false*" property, then rootLogget level is set
> to OFF.
>
> RootLogger logging level can be inherited by other loggers, and changing
> its level can give unexpected results.
>
> Looks like we shoudn't raising level or turning off rootLogger log if
> there are other loggers configured.
>
> Thoughts?
>
> On Fri, Mar 24, 2017 at 1:50 PM, Andrey Mashenkov <
> andrey.mashen...@gmail.com> wrote:
>
>> Hi Sam,
>>
>> 1. Looks like a bug. I think Ignite should not raise log level when
>> adding console appender.
>> Setting System property "IGNITE_CONSOLE_APPENDER" to true will set
>> rootLogger level to OFF that can be unexpectedly as well.
>> Seems, we should check if there is no other loggers configured which can
>> inherits rootLogger logging level before turning rootLogger off.
>>
>> Right?
>>
>> 2. You can configure ConsoleAppender for RootLogger explicitly. Or
>> override logging Level for other loggers.
>>
>>
>>
>> On Thu, Mar 23, 2017 at 11:41 PM, javastuff....@gmail.com <
>> javastuff....@gmail.com> wrote:
>>
>>> Hi
>>>
>>> My application already uses Log4j for logging, simply adding
>>> ignite-log4j.jar enables Ignite logging. I also added a new logger
>>> configuration for package "org.apche.ignite" in my application logging
>>> configuration, so that Ignite can log into a separate rolling file.
>>> Ignite logging working fine. However rootLogger log level is changed to
>>> INFO
>>> by Ignite initialization, which is problematic for my application
>>> logging.
>>>
>>> Ignite configuration file does not have configuration for GridLogger, so
>>> at
>>> initialization it tries to add a new consoleAppender with INFO level by
>>> instantiating Log4JLogger(), here it also updates rootLogger to INFO.
>>>
>>> Question -
>>> 1. Why does Ignite need to update rootLogger log level?
>>> 2. Is this not the good way to configure logging for ignite using
>>> ignite-log4j.jar?
>>>
>>> Thanks
>>> -Sam
>>>
>>>
>>>
>>> --
>>> View this message in context: http://apache-ignite-users.705
>>> 18.x6.nabble.com/Logging-ignite-log4j-jar-tp11400.html
>>> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>>>
>>
>>
>>
>> --
>> Best regards,
>> Andrey V. Mashenkov
>>
>
>
>
> --
> Best regards,
> Andrey V. Mashenkov
>



-- 
Best regards,
Andrey V. Mashenkov

Reply via email to