Re: Logging Design

2002-05-23 Thread Rob Walker
Matt > I would like to decouple my classes from the log4j api and was > considering My main comment would be to really think through the possible benefits before doing this. We considered it, but in the end decided that: i) the Log4J API was well abstracted anyhow, so what would we gain? ii)

RollingFileAppender - my results

2002-05-23 Thread tamir
Hi everybody, Finally I got my rolling file appender work. After a long time which it sometimes worked and sometimes not, I got it working for 10 consecutive days, so I decided It's good time to share it with you. My main problem was that the backup file wasn't created. Every time the file rolled

Strange behaviour of log4j

2002-05-23 Thread Oehlen, Klaus
Hello, I embedded log4j into an existing application. To match the given requirements concerning the loglevel structure, I had to come up with a subclass of the org.apache.log4j.Level class, that contained additional levels. I also wrote a class "LogManager" that wraps a Logger's log (String fqcn

Re: Strange behaviour of log4j

2002-05-23 Thread Ceki Gülcü
Keep mind that the %C and %M information is not guaranteed to be always correct. Just in time compilers have the right to rearrange things, e.g. inline methods and so on. You probably also want to include %c (not %C) in the conversion pattern. BTW, what is the value of the fcqn variable? At

RE: Strange behaviour of log4j

2002-05-23 Thread Benoit Voisin
Hi all, Just a small remark about the parsing of the stack in Log4J. Using the Oracle JVM (included in JDevelopper), the stack trace is not properly parsed. A correction was made in LocationInfo for the VisualAge JVM, and it could eventually be nice to have it also using Oracle. But instead of

AW: Strange behaviour of log4j

2002-05-23 Thread Oehlen, Klaus
Hi there, Ceki is right: it must be the JIT compiler rearranging things. Unfortunately in my case %c won't help to identify the calling class, because a Category's name is not related to the class name that triggered a log call. It's a large application and I was too lazy to edit/maintain the set

How doe I configure the SocketAppender ?

2002-05-23 Thread Dirk Storck
Hi, how must I configure the SocketAppender in my properties file Many thanks !!! -- To unsubscribe, e-mail: For additional commands, e-mail:

Log4J/Servlets & Initialisation

2002-05-23 Thread Pounder, Anthony
Hi All I've been using Log4J for a couple of weeks and I have recently made use of it in a Java servlet. I came across a bit of problem when the servlet was deployed, in that the admin guy doing the deployment introduced a space between the 1st servlet init parameter and the init parameter that h

Stopping logger

2002-05-23 Thread Frissaer, Jeroen
Hi everyone, I'm using a whole bunch of loggers that are children from EventLogger or TraceLogger. How can I for example stop the logging activity of all loggers that inherit from the EventLogger? I know you can shut down logging entirely for all loggers, but that is not what I want because than

Log4j does not work for a process that is spawned thru System.getRuntime ().exec ("java myProc") call

2002-05-23 Thread Aleksandr Shneyderman
!!!I have my main thread. !!!From within that thread I am try ing to !!!spawn two other processes by !!!Process p = System.getRuntime ().exec ("java myProc"); !!! !!!Now when p gets to work the first thing it does it reads !!!log4j config file and will try to log messages in there !!!I use FileAp

RE: Stopping logger

2002-05-23 Thread Mark Womack
Jeroen, When you say "children" from EventLogger or TraceLogger, what do you mean? When you create the trace instance in your classes, what do you pass in as the logger name? The class name? Can you give some examples of names that are passed? -Mark > -Original Message- > From: Frissa

Catching exceptions when appenders are missing

2002-05-23 Thread Fruechtenicht, Torben
Hi, can anyone give me a hint how I can manage to catch those exception from Log4J which are caused by an invalid configuration of appenders (the infamous "No appenders could be found for category..." error) or an invalid file appender path? I understand that I can do all the configuration and

Re: Catching exceptions when appenders are missing

2002-05-23 Thread Ceki Gülcü
I am not sure I understand the question. What do you want to see happen? Please give a concrete example. One of the features I'd like to see in log4j 1.3 are error handlers for configurators much like what exists for appenders. Is this what you want? At 20:43 23.05.2002 +0200, you wrote: >Hi, >

RE: Logging Design

2002-05-23 Thread Robertson, Don
Matt, Rob I agree with Rob with one exception. The one thing that we did abstract for log4j client code is the acquisition of the Logger instance (see below). Despite the advice to the contrary we found that we needed at least thread-specific logging control in some circumstances, so storing th

Unicode Strings in Log4j-1.1.3

2002-05-23 Thread Scott . Kay
I'm having trouble trying to print Unicode text to a logfile with log4j-1.1.3. I have a JDialog with a JTextField, that accepts a string input; I input some chinese characters to this dialog and use Log.Debug() to print it out the input to a log file using log4j-1.1.3. (When I print out to the con

Re: Unicode Strings in Log4j-1.1.3

2002-05-23 Thread Ceki Gülcü
Scott, The answer depends on the output destination. The WriterAppender (and all its subclasses) has an property called "encoding". US-ASCII, ISO-8859-1, UTF-8, UTF-16BE, UTF-16LE, UTF-16 are some encoding names. HTH, Ceki At 17:12 23.05.2002 -0400, [EMAIL PROTECTED] wrote: >I'm having trouble

Re: Unicode Strings in Log4j-1.1.3

2002-05-23 Thread Scott . Kay
Ceki, Thanks for the help, The appender being used is the ConsoleAppender, specified as below in the XML config file. So in order to see the Unicode string I would need to set the "encoding" property presumably to one of the UTF encodings? I looke

Re: Unicode Strings in Log4j-1.1.3

2002-05-23 Thread Ceki Gülcü
The encoding property was added in log4j version 1.2. As for the actual encoding you should choose, I can only refer you to the Java Language documentation. At 17:46 23.05.2002 -0400, [EMAIL PROTECTED] wrote: >Ceki, Thanks for the help, > >The appender being used is the ConsoleAppender, specif

Error thrown from org.apache.log4j.spi.ThrowableInformation

2002-05-23 Thread Kevin Steppe
When I use log4j to log message and stack info when Class.forName().newInstance() fails I get an Error thrown. I thought log4j was supposed to guarentee this didn't happen? Here is the error: java.lang.VerifyError: (class: org/apache/log4j/spi/ThrowableInformation, method: getThrowableStrRep

Is application calling API same thread as appender

2002-05-23 Thread john grup
I'm new to log4j and was trying to trace the log event from the log API to the appender and can't figure out if they are on the same thread or if the log manager uses a different thread for the logger instance than the app calling the logger. Can someone help work through it? Thanks, John

Re: Error thrown from org.apache.log4j.spi.ThrowableInformation

2002-05-23 Thread Ceki Gülcü
Which version of log4j is this? Do you have different versions of log4j lying around, say on the classpath and WEB-INF/lib for example? The documentation for VerifyError says: Thrown when the "verifier" detects that a class file, though well formed, contains some sort of internal incon

Is application calling API same thread as appender

2002-05-23 Thread john grup
I'm new to log4j and was trying to trace the log event from the log API to the appender and can't figure out if they are on the same thread or if the log manager uses a different thread for the logger instance than the app calling the logger. Can someone help work through it? Thanks, John