Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Robert Klemme Newsgroups: comp.lang.java.programmer Subject: Re: Logging Date: Sat, 01 Oct 2011 11:23:51 +0200 Lines: 22 Message-ID: <9eo4h8Foo5U1@mid.individual.net> References: <4e866a62$0$288$14726298@news.sunsite.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: individual.net VFUU9Vu8jpTQZSmaDCIzZQ4m5H2B4zVV222fn4nPkBq2UkUmw= Cancel-Lock: sha1:kgkjOK+swAm8VhV/LdR452fO+q0= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.23) Gecko/20110922 Lightning/1.0b2 Thunderbird/3.1.15 In-Reply-To: <4e866a62$0$288$14726298@news.sunsite.dk> Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:8435 On 10/01/2011 03:18 AM, Arne Vajh=F8j 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=20 approach because it leaves the option to enable logging if that should=20 be necessary. Kind regards robert