But if I dont use a SocketAppender the log is fine.
ie. if I do :
$java examples.Sort examples/sort1.properties 10

I get the perfect log on the console !!!

So I dont think the JIT or no debug info is the problem.

-----Original Message-----
From: Ebersole, Steven [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 30, 2002 5:40 PM
To: 'Log4J Users List'
Subject: RE: SocketAppender help required


This is generally caused by either compiling your source using the "no debug
info" option or are using a JIT-compiler.

If the first, then just omit the "-g:none" option from the javac command.
If the second, I am not sure if there is anything you can do.



    |-----Original Message-----
    |From: Kohinoor Lal Verma (EHS) 
    |[mailto:[EMAIL PROTECTED]]
    |Sent: Monday, September 30, 2002 3:41 AM
    |To: '[EMAIL PROTECTED]'
    |Subject: SocketAppender help required
    |
    |
    |Hi,
    |
    |I am trying to learn using log4j. I am facing a problem. I 
    |would appreciate
    |if someone can help me.
    | 
    |I tried to run the Sort.java example (from /examples ) 
    |with some changes in
    |the properties file.
    |I changed the "log4j.appender.A1.layout.ConversionPattern" 
    |value to "%-5p
    |[%d{dd-MM-yyyy HH:mm:ss}] %C.%M() - %m%n" in sort1.properties
    |i.e.  in sort1.properties
    |log4j.appender.A1.layout.ConversionPattern=%-5p 
    |[%d{dd-MM-yyyy HH:mm:ss}]
    |%C.%M() - %m%n
    | 
    |I started a Simple SocketServer with sort1.properties:
    |$java org.apache.log4j.net.SimpleSocketServer 12345
    |examples/sort1.properties 
    | 
    |Then I ran the Sort program with sort3.properties
    |$java examples.Sort examples/sort3.properties 10
    |
    |I got the following output
    | 
    |INFO  [30-09-2002 13:57:52] 
    |org.apache.log4j.net.SimpleSocketServer.main() -
    |Listening on port 12345
    |.........
    | 
    |INFO  [30-09-2002 13:58:00] ?.?() - Populating an array of 
    |10 elements in
    |reverse order.
    |INFO  [30-09-2002 13:58:00] ?.?() - Entered the sort method.
    |DEBUG [30-09-2002 13:58:00] ?.?() - in outer loop.
    |DEBUG [30-09-2002 13:58:00] ?.?() - in inner loop.
    |DEBUG [30-09-2002 13:58:00] ?.?() - Swapping intArray[0]=9 
    |and intArray[1]=8
    |DEBUG [30-09-2002 13:58:00] ?.?() - in inner loop.
    |...............
    | 
    | 
    |The ? in the above log is because of %C and %M. Is there 
    |anyway where I can
    |get the proper log, I mean no ?.
    |(The actual log can be seen by running $java examples.Sort
    |examples/sort1.properties 10)
    | 
    |Does anyone have a solution for this?
    | 
    | 
    |Rgds
    |Kohinoor
    |
    | 
    | 
    |
    | 
    |
    |    Kohinoor Lal Verma 
    |    Senior Systems Engineer 
    |    Ericsson Internet Applications 
    |    New Delhi, India 
    |
    | 
    | 
    |

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to