Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #8380 > unrolled thread

Logging

Started byIlya Lakhmitski <ilya.lakhmitski@gmail.com>
First post2011-09-27 23:15 -0700
Last post2011-10-01 15:54 -0400
Articles 5 — 4 participants

Back to article view | Back to comp.lang.java.programmer


Contents

  Logging Ilya Lakhmitski <ilya.lakhmitski@gmail.com> - 2011-09-27 23:15 -0700
    Re: Logging Tobi <tobias.schulzeheinrichs@googlemail.com> - 2011-09-29 03:04 -0700
    Re: Logging Arne Vajhøj <arne@vajhoej.dk> - 2011-09-30 21:18 -0400
      Re: Logging Robert Klemme <shortcutter@googlemail.com> - 2011-10-01 11:23 +0200
        Re: Logging Arne Vajhøj <arne@vajhoej.dk> - 2011-10-01 15:54 -0400

#8380 — Logging

FromIlya Lakhmitski <ilya.lakhmitski@gmail.com>
Date2011-09-27 23:15 -0700
SubjectLogging
Message-ID<d5f48d66-ea74-4da5-bafd-0d2b0b2f8f19@y18g2000yqy.googlegroups.com>
Is there a way do not print to the console the message:

log4j:WARN No appenders could be found for logger?

[toc] | [next] | [standalone]


#8396

FromTobi <tobias.schulzeheinrichs@googlemail.com>
Date2011-09-29 03:04 -0700
Message-ID<372fe397-bf5c-4cd4-b1ef-636fd6e7b97c@k34g2000yqm.googlegroups.com>
In reply to#8380
On 28 Sep., 08:15, Ilya Lakhmitski <ilya.lakhmit...@gmail.com> wrote:
> Is there a way do not print to the console the message:
>
> log4j:WARN No appenders could be found for logger?

It looks like you're using the log4j framework but didn't configured
any appender. Could you provide some more information (e.g. the log4j
configuration)?

[toc] | [prev] | [next] | [standalone]


#8427

FromArne Vajhøj <arne@vajhoej.dk>
Date2011-09-30 21:18 -0400
Message-ID<4e866a62$0$288$14726298@news.sunsite.dk>
In reply to#8380
On 9/28/2011 2:15 AM, Ilya Lakhmitski wrote:
> Is there a way do not print to the console the message:
>
> log4j:WARN No appenders could be found for logger?

If you want log output, then configure log4j properly
(see the log4j docs on how to do that).

If you don't want that, then put this in the top
of your main:

Logger.getRootLogger().addAppender(new NullAppender());

Arne

[toc] | [prev] | [next] | [standalone]


#8435

FromRobert Klemme <shortcutter@googlemail.com>
Date2011-10-01 11:23 +0200
Message-ID<9eo4h8Foo5U1@mid.individual.net>
In reply to#8427
On 10/01/2011 03:18 AM, Arne Vajhøj wrote:
> On 9/28/2011 2:15 AM, Ilya Lakhmitski wrote:
>> Is there a way do not print to the console the message:
>>
>> log4j:WARN No appenders could be found for logger?
>
> If you want log output, then configure log4j properly
> (see the log4j docs on how to do that).
>
> If you don't want that, then put this in the top
> of your main:
>
> Logger.getRootLogger().addAppender(new NullAppender());

Even that can be controlled via configuration.  I would prefer that 
approach because it leaves the option to enable logging if that should 
be necessary.

Kind regards

	robert

[toc] | [prev] | [next] | [standalone]


#8462

FromArne Vajhøj <arne@vajhoej.dk>
Date2011-10-01 15:54 -0400
Message-ID<4e876ff7$0$293$14726298@news.sunsite.dk>
In reply to#8435
On 10/1/2011 5:23 AM, Robert Klemme wrote:
> On 10/01/2011 03:18 AM, Arne Vajhøj wrote:
>> On 9/28/2011 2:15 AM, Ilya Lakhmitski wrote:
>>> Is there a way do not print to the console the message:
>>>
>>> log4j:WARN No appenders could be found for logger?
>>
>> If you want log output, then configure log4j properly
>> (see the log4j docs on how to do that).
>>
>> If you don't want that, then put this in the top
>> of your main:
>>
>> Logger.getRootLogger().addAppender(new NullAppender());
>
> Even that can be controlled via configuration. I would prefer that
> approach because it leaves the option to enable logging if that should
> be necessary.

There is a point in that.

Arne

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web