Re: AW: using variables in log4j xml file

2006-08-22 Thread Jacob Kjome
Hi Patrick, So, you've verified that the "env." scope works to look up OS properties in Log4j? If this works, I guess I stand corrected on my previous statement where I said that this sort of thing wasn't recognized as anything special by Log4j. Or is it that the System class loads up all exist

Re: JDBC Appender

2006-08-22 Thread Jacob Kjome
Do you have more than one version of Log4j in the classpath? I would also be wary of using Log4j-1.3 alpha in production. Best to stick with the 1.2.xx series. Jake Quoting Merin Shaji <[EMAIL PROTECTED]>: > Jake, > > Thanks for your reply. I tried out NDC and is working fine. > > But I could

Exceptions in activateOptions

2006-08-22 Thread Robert Fischer
Hello, i'm developing a Plugin for log4j version 1.3, but i'm not sure whats the "right way" to handle exceptions in the activateOptions() method. Currently my code is as follows: class MyPlugin extends PluginSkeleton {   ...   public void activateOptions() {     try {       [ ...do something..

Re: SMTPAppender : how to specify the port ?

2006-08-22 Thread Javier Gonzalez
On 8/22/06, DeMZed <[EMAIL PROTECTED]> wrote: Exactly. It seems that I must create a new class MySMTPAppender extending SMTPAppender :( You could also do some tunneling or port redirection (redir does this under linux) outside your jvm enviroment. -- Javier González Nicolini

RE: Testing log4j with UTF-16

2006-08-22 Thread Kamal Ahmed
Hi, How is it possible to ignore/skip the first 2 bytes (which is 0xFEFF) "BOM" Byte Order Mark, in the class BinaryCompare.java (as copied below) - /* * Copyright 1999,2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "Lice

Re: SMTPAppender : how to specify the port ?

2006-08-22 Thread James Stauffer
You might be able to get something that will map the port outside of log4j. On 8/22/06, DeMZed <[EMAIL PROTECTED]> wrote: Exactly. It seems that I must create a new class MySMTPAppender extending SMTPAppender :( -Message d'origine- De : James Stauffer [mailto:[EMAIL PROTECTED] Envoyé :

RE: SMTPAppender : how to specify the port ?

2006-08-22 Thread DeMZed
Exactly. It seems that I must create a new class MySMTPAppender extending SMTPAppender :( -Message d'origine- De : James Stauffer [mailto:[EMAIL PROTECTED] Envoyé : mardi 22 août 2006 18:21 À : Log4J Users List Objet : Re: SMTPAppender : how to specify the port ? The values that you can

Re: SMTPAppender : how to specify the port ?

2006-08-22 Thread James Stauffer
The values that you can set correspond to the set* methods so look at the API. I don't see a method to set the port. On 8/22/06, DeMZed <[EMAIL PROTECTED]> wrote: Hi ! I use this appender :

SMTPAppender : how to specify the port ?

2006-08-22 Thread DeMZed
Hi ! I use this appender : My SMTP daemon is listening on port 250, not 25. What is the param name for the port ? I tryed SM

Re: Help - using a wrapper for log4j

2006-08-22 Thread James Stauffer
There is a way to get the correct line numbers and it has been discussed on the mailing list but I don't remember what it is so you will need to search the archives. Here are my suggestions in order of preference: 1. Just use log4j. If you use a wrapper you lose some of the power of log4j and th

RE: [SPAM (Bayesain Analysis)] - Help - using a wrapper for log4j - Bayesian Filter detected spam

2006-08-22 Thread Bender Heri
Your log calls should call the generic Logger.log() method, where you pass the FQCN of your LogWrapper. Location information are stripped away by the log4j framework up to this passed FQCN. logDebug(Object desc) { logger.log( LogWrapper.class.getName(), Level.DEBUG, desc, null );

Help - using a wrapper for log4j

2006-08-22 Thread chetan . v . minajagi
Hi, I have a class that holds a reference to Log4j's logger in it.I call this LoggerWrapper. The intention of using this and not Logger(log4j's Logger) directly is to keep my code as independent of log4j as possible. This LoggerWrapper has methods called logDebug(Object description) i.e logXXX

Re: lifesigns

2006-08-22 Thread patrick
Takacs Bence-2 wrote: > > What if I make my own LifeSignAppender, which is not a real logger but > has a Time parameter, and runs Threads which measure time, and if the > Time is up, throw an ERROR level log? However, could an appender throw a > log message? > make your LifeSignAppender ext

Re: InterruptedIOException in WriterAppender and Thread.interrupt()

2006-08-22 Thread Patrick Wyss
fair question :-} as the log statement was the very first thing to happen in my new thread i was not expecting that the interrupt from outside could already happen. that's quite a stupid assumption i made. obviously timing on my single prozessor WinXP machine and on the multiprocessor sun serve

AW: using variables in log4j xml file

2006-08-22 Thread Patrick Wyss
farzad, as jake already pointed out, there are 2 solutions to your problem: 1. specify a system property by -D as described in the mail from 21. August 2006 22:17 or (and i guess this is what you are looking for) 2. if you want to access the OS environment property then you have to access it wit