logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Stauffer" <stauffer.ja...@gmail.com>
Subject Re: Initialize problem on linux machine
Date Wed, 17 May 2006 18:00:52 GMT
Run with -Dlog4j.debug and it should show you how it it trying to
configure itself.

On 5/17/06, Christian Haase <haase@siteface.de> wrote:
> Hi all!
>
> After a frustrating day without success I hope you can help me.
> I've trouble running my Java-Apps at Suse Linux. On WinXP all works fine.
>
> Problem description:
> ===============
>
> Error:
> log4j:WARN No appenders could be found for logger (me.objects.Environment).
> log4j:WARN Please initialize the log4j system properly.
>
>
> My Java Source (Snippet):
> public class XmlSplitter {
> private static final org.apache.log4j.Logger logger =
> org.apache.log4j.Logger.getLogger( XmlSplitter.class.getName() );
> ...
>  public static void main( String[] args )  throws Exception
>    {
>       System.setProperty("log4j.file.name", "XmlSplitter");
>       // Only for debugging:
>       System.getProperties().list(System.out);
>      ....
>
> Produces following System.out:
> -- listing properties --
> java.runtime.name=Java(TM) 2 Runtime Environment, Stand...
> sun.boot.library.path=/usr/lib/SunJava2-1.4.2/jre/lib/i386
> java.vm.version=1.4.2_08-b03
> java.vm.vendor=Sun Microsystems Inc.
> java.vendor.url=http://java.sun.com/
> path.separator=:
> java.vm.name=Java HotSpot(TM) Client VM
> file.encoding.pkg=sun.io
> user.country=DE
> sun.os.patch.level=unknown
> java.vm.specification.name=Java Virtual Machine Specification
> user.dir=/work
> java.runtime.version=1.4.2_08-b03
> java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment
> java.endorsed.dirs=/usr/lib/SunJava2-1.4.2/jre/lib/endorsed
> os.arch=i386
> java.io.tmpdir=/tmp
> java.vm.specification.vendor=Sun Microsystems Inc.
> os.name=Linux
> sun.java2d.fontpath=
> log4j.configuration=/work/fop/entwicklung/log4j.properties   <--- Looks
> right, or not?
> java.library.path=/usr/lib/SunJava2-1.4.2/jre/lib/i386/...
>
>
> Contents of my log4j.properties:
> log4j.rootLogger=INFO, FILE, stdout
> #### First appender writes to console
> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
> log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
> # Error-Log in rollierendes ASCII-File, max. 1 MB:
> log4j.appender.FILE=org.apache.log4j.RollingFileAppender
> log4j.appender.FILE.File=/work/fop/entwicklung/log/${log4j.file.name}.log
> log4j.appender.FILE.MaxFileSize=1000KB
> log4j.appender.FILE.MaxBackupIndex=3
> log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
> log4j.appender.FILE.layout.ConversionPattern=%d %p %l - %m%n
> --
>
> Any ideas where the problem is?
>
> Greetings,
> Christain
>
>
> -------------------------------------
> Christian Haase, Hans-Mertens-Str. 37
> 30655 Hannover, GERMANY
> Tel: +49-511-697916 / +49-178-7772617
> Fax: +49-511-3948280
> ICQ: 307628315
> -------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>


-- 
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/

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


Mime
View raw message