Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!news.glorb.com!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail Date: Sat, 01 Oct 2011 15:54:27 -0400 From: =?ISO-8859-1?Q?Arne_Vajh=F8j?= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 MIME-Version: 1.0 Newsgroups: comp.lang.java.programmer Subject: Re: Logging References: <4e866a62$0$288$14726298@news.sunsite.dk> <9eo4h8Foo5U1@mid.individual.net> In-Reply-To: <9eo4h8Foo5U1@mid.individual.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Lines: 23 Message-ID: <4e876ff7$0$293$14726298@news.sunsite.dk> Organization: SunSITE.dk - Supporting Open source NNTP-Posting-Host: 72.192.23.141 X-Trace: news.sunsite.dk DXC=A;?9h5g:K7mCf4eYcI3F5hYSB=nbEKnkkAYIL9Z9\VaoJPe3\kP5EUaKBm9cfh9BSdM2;kT<[:>[aL`ea\CQ6Jdi 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