File-Appender: Empty Ghost files

2005-04-07 Thread Bender Heri
Hi all I have a server application which can serve multiple clients. The logging occurs in files separated by client. (BTW: This is accomplished by supplying a own RepositorySelector which uses certain values in MDC). Therefore the file name within the configurtion file

RE: Multiple loggers, same application?

2005-04-12 Thread Bender Heri
Darren you must make more clear what you want to achieve: Do you want only three different destinations (appenders) to log to? Or do you want three different loggers, each one with his own set of appenders? What is the kind of the desired appenders? How do you want to distinguish the different

RE: Extend or Wrap

2005-04-20 Thread Bender Heri
Hi Antoine I dont have an example how to deal with new levels but annother point is important while wrapping. You have to use the overloaded method log(String callerFQCN, Priority level, Object message, Throwable t) where you pass as first parameter the name of the wrapper class. The renderer

RE: Query regarding Stored Procedure / Insertion Into Multiple Tables

2005-05-02 Thread Bender Heri
Hi Rajesh it's no problem to use a stored proc, at least not if the DB is Oracle. I have a descendent of JDBCAppender: myJDBCAppender. This class has a property PreparedSQL, which is filled by the LogManager when initializing from configuration file (see below). Within the overwritten

RE: Log file does not gets created with log4j

2005-05-24 Thread Bender Heri
Hi the leading slash might be the culprit. Also ensure that the directory exists. Heri -Original Message- From: Ranjan, Rajiv [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 24, 2005 10:13 AM To: log4j-user@logging.apache.org Subject: Log file does not gets created with log4j

RE: Late file creation option

2005-05-24 Thread Bender Heri
Hi hein The short answer is no. the long answer see thread with subject File-Appender: Empty Ghost files between 7. and 11. April of this year. Heri -Original Message- From: Hein Meling [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 24, 2005 4:25 PM To: Log4J Users List Subject:

RE: new user question re: configuring log4j via code

2005-06-29 Thread Bender Heri
Where and how do you call your LoggingConfiguration class exactly? The code private static Logger log = Logger.getLogger(Foo.Bar.class); is called at class loading, before any real code is executed. In one JVM there is only one LogManager which has per default only one logger repository. So

RE: new user question re: configuring log4j via code

2005-06-29 Thread Bender Heri
' Cc: Bender Heri Subject: RE: new user question re: configuring log4j via code I call the LoggingConfiguration class/glorified-global near the start of the main() routine. I use ProcessBuilder.start() to launch other classes that have their own main() (which in turn also call

RE: Log4J Help requested

2005-07-06 Thread Bender Heri
Your property file is maybe not in the classpath? Or has not the default name? -Original Message- From: Balaji Saranathan [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 06, 2005 4:46 PM To: log4j-user@logging.apache.org Subject: Log4J Help requested Hi, I'm new to log4j

RE: Clarification

2005-07-06 Thread Bender Heri
Usually I configure by XML file and I am not quite shure, but: log4j.appender.framework.File=framework.log=./logs/framework.log seems to have one = to much. Did it work with your first version log4j.appender.framework.File=framework.log ? Heri -Original Message- From: Balaji

RE: Appender per Thread (rootLogger contention)

2005-08-16 Thread Bender Heri
Hi Using an own written RepositorySelector is a reasonably way of having different logger universes within the same JVM. Using the standard selector returns always the same logger instance for a given name, since it it is stored within the unique default repository. A self written selector

RE: seize all logging messages?

2005-08-17 Thread Bender Heri
Derive a class from ObjectRenderer and define which class should be rendered by your new renderer: renderer renderedClass=java.lang.String renderingClass=foo.bar.myRenderer/ Then you overwrite the method doRender(), where you obtain the String as parameter. Do whatever you like

RE: Specifying logging levels independently

2005-09-01 Thread Bender Heri
Of course you can do this. Set either the level of the logger to the desired value: level value=warning/ or set the threshold tag of an appender: param name=Threshold value=WARNING/ or define a filter withing an appender: filter

RE: Problem in RollingFileAppender

2005-09-06 Thread Bender Heri
Yes, Log4j creates all file immediatly when loading configuration. I wish it would create them lazy only when first writing occurs. Heri -Original Message- From: Arunkumar Soundararajan [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 06, 2005 11:10 AM To: Log4J Users List Cc:

RE: DailyRollingFileAppender writing to previous day's log

2005-09-08 Thread Bender Heri
Hi If it's not a must to write into the same log file: there are several techniques to separate the logger universes in order that the same package/class writes to different log files. The easiest way is by using the fact that the different apps run in different thread contexts (I assume this

RE: Log4j Appenders/Category Usage

2005-10-06 Thread Bender Heri
Because you forgot the attribute additivity=false BTW: you should use the new Identifier logger. category is deprecated. logger name=com.company.a.b.c.f additivity=false and logger name=com.company.a.b.d.f additivity=false Heri -Original Message- From: news [mailto:[EMAIL

RE: log4j xml configuration problem -- should be easy

2005-10-13 Thread Bender Heri
Hi you must define the appenders before the loggers within the config file. See the dtd file. Heri -Original Message- From: David Durham [mailto:[EMAIL PROTECTED] Sent: Thursday, October 13, 2005 3:06 PM To: log4j-user@logging.apache.org Subject: log4j xml configuration problem --

RE: LOG4J messages printing twice

2005-10-24 Thread Bender Heri
Hallo A static member is initialized only once, at the time when the class first time is loaded. Beside that, the call to Logger.getLogger( xyz ) delivers always the same instance of the logger xyz. You can call this as much as you like. The logger repository is built new on every restart of

RE: LOG4J messages printing twice

2005-10-24 Thread Bender Heri
the key the number of times it logs increases by one... Thank you, Regards, Charith I. Fernando +94 77 3263222 (Mobile) -Original Message- From: Bender Heri [mailto:[EMAIL PROTECTED] Sent: Monday, October 24, 2005 3:32 PM To: Log4J Users List Subject: RE: LOG4J messages

RE: LOG4J messages printing twice

2005-10-24 Thread Bender Heri
(Mobile) -Original Message- From: Bender Heri [mailto:[EMAIL PROTECTED] Sent: Monday, October 24, 2005 5:07 PM To: Log4J Users List Subject: RE: LOG4J messages printing twice Do you mean: - start program - press button - - one log entry on console - press button again

RE: WELCOME to log4j-user@logging.apache.org

2005-10-25 Thread Bender Heri
Elaine Log4j has nothing to do with registry. This is java world, that means crossplattform world. Everything is configured by files and nothing by windows registry. You can, of course, read registry values out from your program and configure or reconfigure log4j by code. But that's up to

RE: NTEventLogAppender

2005-10-27 Thread Bender Heri
registry values out from my program? Elaine -Original Message- From: Bender Heri [mailto:[EMAIL PROTECTED] Sent: 25 October 2005 12:12 To: Log4J Users List Subject: RE: WELCOME to log4j-user@logging.apache.org Elaine Log4j has nothing to do with registry. This is java world

RE: How to config LevelMatchFilter

2005-11-01 Thread Bender Heri
IIRC you can't use Filters in property files, only in xml. Heri -Original Message- From: James Stauffer [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 01, 2005 4:18 PM To: Log4J Users List Subject: Re: How to config LevelMatchFilter I only use XML config so I don't know.

RE: How to config LevelMatchFilter

2005-11-01 Thread Bender Heri
David On 11/1/05, Bender Heri [EMAIL PROTECTED] wrote: IIRC you can't use Filters in property files, only in xml. Heri -Original Message- From: James Stauffer [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 01, 2005 4:18 PM

RE: Basic Assistance

2005-11-03 Thread Bender Heri
The static approach only works if you use only one logger repository. If you want to separate logging universes i.e. by using MDC you have to instantiate a logger for each instance of a class. Logging statements out of static helper routines even need fetch the correct logger inline not via a

static loggers (was Logger serialization)

2005-11-29 Thread Bender Heri
There are situations where you cant use static members. If you separate logging universes by using a specialzed RepositorySelector, which returns different loggers depending on diffenrent MDC values. If the basic framework classes, which are used in different applications (moduls), but running

RE: Logging Event

2005-11-29 Thread Bender Heri
The specifier t within the layout pattern renders the thread name to the output. I dont know how to output the thread ID. what do you mean by some other information? You can put some values into the MDC before calling a logging function. Within the layout you can render this values again:

RE: Silly ? - How do I figure out the name of the file the log is being written to?

2005-12-01 Thread Bender Heri
(FileAppender) Logger.getLogger( aLoggerName ).getAppender( aAppenderName ).getFile(); -Original Message- From: Burton Strauss [mailto:[EMAIL PROTECTED] Sent: Thursday, December 01, 2005 5:10 AM To: log4j-user@logging.apache.org Subject: Silly ? - How do I figure out the name of the

RE: Silly ? - How do I figure out the name of the file the log is being written to?

2005-12-01 Thread Bender Heri
-Original Message- From: Bender Heri [mailto:[EMAIL PROTECTED] Sent: Thursday, December 01, 2005 3:14 AM To: Log4J Users List Subject: RE: Silly ? - How do I figure out the name of the file the log is being written to? (FileAppender) Logger.getLogger( aLoggerName ).getAppender

RE: Silly ? - How do I figure out the name of the file the log is being written to?

2005-12-01 Thread Bender Heri
,test log4j.appender.test=org.apache.log4j.DailyRollingFileAppender log4j.appender.test.Append=false log4j.appender.test.File=testbed.log log4j.appender.test.layout=org.apache.log4j.SimpleLayout -Burton -Original Message- From: Bender Heri [mailto:[EMAIL

RE: Silly ? - How do I figure out the name of the file the log is being written to?

2005-12-01 Thread Bender Heri
Assuming your configuration is still the same (root logger with appender test) then the call Appender ap = LogManager.getRootLogger().getAppender( test); should return your file appender test. Doesn't it? If you call Logger.getLogger( Test ) you get a logger instance without any appenders

RE: PropertyConfigurator, appenders attaching to root and multiple outputs at different levels...

2005-12-05 Thread Bender Heri
See inline log4j.rootLogger=info,console,file Here you define the root logger with level info which has attached two appenders (console and file). log4j.logger.console=warn This logger, called console, has level warn, but no appender attached

RE: Logging different Log-Level for the same Logger

2005-12-05 Thread Bender Heri
At the first glance I think it should work like you expect. I only ask me what the levels ISWARN and ISDEBUG should be. Did you define them yourself? Or is this a cpp issue? In java it would be WARN and DEBUG. Which log file you get? If it is the second one (IS_SER_complete.log) then probably

RE: Logging different Log-Level for the same Logger

2005-12-05 Thread Bender Heri
See below. Yes you are right. We had to define our own log-levels because we had to write the severity-text and the severity-level. But I did one mistake in the example: Both Logger use log4cplus.logger.islog. So the following two lines are correct. Sorry. log4cplus.logger.islog=ISWARN,

RE: Configure two log4j loggers in one application

2005-12-12 Thread Bender Heri
you can define as many loggers as you want within one configuration file / jvm. The same is true for appenders. And you are free to attach whatever appender to whatever logger. You even can attach the same appender to two or more different loggers. Your last question (get Logger by appender) I

RE: Configure two log4j loggers in one application

2005-12-12 Thread Bender Heri
of org.apache.log4j.Logger which uses the certain appender in my xml configuration file? Best regards, Leon --- Bender Heri [EMAIL PROTECTED] wrote: you can define as many loggers as you want within one configuration file / jvm. The same is true for appenders. And you are free to attach

RE: Configure two log4j loggers in one application

2005-12-12 Thread Bender Heri
jars. But will be deployed to one war. Best regards, Leon --- Bender Heri [EMAIL PROTECTED] wrote: Do the two services run in different thread / thread-hierarchies? Heri - To unsubscribe, e-mail: [EMAIL

RE: Configure two log4j loggers in one application

2005-12-12 Thread Bender Heri
--- Bender Heri [EMAIL PROTECTED] wrote: I never had to deal with jar's in war's. Therefore I don't know what you want to say with this. My question was if the two services are running within separate threads within the same JVM. If this is the case, the solution would be to use a self

RE: Dispatch messages to multiple files from the same class with several loggers ?

2006-01-03 Thread Bender Heri
Yes, it is possible. The naming of the loggers is not forced to be class names. You can choose whatever you want. Using class names (including package path) is just a comfort convenience which offers a bulk of advantages. So you are free to define 4 different loggers with distinct names and

RE: How to apply multiple filters to single appender

2006-01-10 Thread Bender Heri
if the first filter delivers DENY or ACCEPT, then the second filter is not called. if the return value would be NEUTRAL, also the second filter is called. I'm not shure, but can't you use regular expression in one filter (or'd)? Heri -Original Message- From: Praveen Kumar

RE: ObjectRenderer Config and Usage

2006-01-19 Thread Bender Heri
The output of the self written object renderer is a string. This will be handled by the pattern like you would have put a string directly, means the %m switch will be replaced by your string. Heri -Original Message- From: Anant K [mailto:[EMAIL PROTECTED] Sent: Thursday, January 19,

RE: enable filter

2006-02-01 Thread Bender Heri
You dont need a filter for doing this, because this is covered by the core idea of the log4j framework. Just define a logger named org.jboss.deployment.MainDeployer, attach the desired file appender to this class and set the additivity flag to false. If you don't attach the same appender to

RE: enable filter

2006-02-01 Thread Bender Heri
by jboss, I'm only modifying it. I suppose that, I can only enable a filter using the log4j.xml file. Thanks, Pedro -Original Message- From: Bender Heri [mailto:[EMAIL PROTECTED] Sent: quarta-feira, 1 de Fevereiro de 2006 14:39 To: Log4J Users List; [EMAIL PROTECTED] Subject: RE

RE: problem getting location info from client

2006-02-06 Thread Bender Heri
First, it's not a good idea to subclass the Logger class. Better write a wrapper if you want to centralize some logging policies. Your problem can be solved if you do not call the super.info() etc., but the generic log(String callerFQCN, Priority level, Object message, Throwable t) method. The

RE: activateOptions() in RollingFileAppender

2006-02-07 Thread Bender Heri
No. You should call it in code after having assigned new values to appender properties. Heri -Original Message- From: Rahul [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 07, 2006 3:20 PM To: log4j-user@logging.apache.org Subject: activateOptions() in RollingFileAppender Hi

RE: activateOptions() in RollingFileAppender

2006-02-07 Thread Bender Heri
=Logger.getLogger(ClassName.class); which creates a logger instance then logger.info(some log); Where should I call activateOptions() and how to invoke that piece of code? Bender Heri wrote: No. You should call it in code after having assigned new values to appender properties. Heri

RE: Filtering messages with Log4j.xml

2006-02-14 Thread Bender Heri
Are you shure your correct xml configuration is loaded in your GUI(web) app? BTW what you mean with GUI(web) exactly? Heri -Original Message- From: Praveen Kumar Hasthalapuram [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 14, 2006 2:38 PM To: log4j-user@logging.apache.org

RE: Filtering messages with Log4j.xml

2006-02-14 Thread Bender Heri
LOOOL... To see what xml is loaded start your JVM (Webserver?) with the commandline option -Dlog4j.debug Heri -Original Message- From: Praveen Kumar Hasthalapuram [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 14, 2006 3:40 PM To: Log4J Users List Subject: Re: Filtering

RE: Use different log files inside one program

2006-02-22 Thread Bender Heri
No, this would not work since you dont know the thread id in configuration file where you name the logger. You must implement your own repository selector which maintains a repository for each thread (or other distinguishing features as you like). The following is a sample which has two

RE: Single logfile per User and Day

2006-02-27 Thread Bender Heri
A possibility to have different logger universes in one JVM instance I have described last week. See Thread Use different log files inside one program. Applying this solution you can achieve your wished clientID within the filename. The problem of the daily log is solved at best with

RE: Single logfile per User and Day

2006-02-27 Thread Bender Heri
Your solution was to implement a custom RepositorySelector, wasn't it? Right. What I can't see in your solution was the place where I set the filename. You've said something about getting the FileAppender? Can you please explain? I assume you configure your log4j framework through

RE: Different log files for different web applications under Tomcat

2006-02-27 Thread Bender Heri
see actual thread Single logfile per User and Day and the thread from last week Use different log files inside one program. Heri -Original Message- From: julie gautier [mailto:[EMAIL PROTECTED] Sent: Monday, February 27, 2006 4:37 PM To: log4j-user@logging.apache.org Subject:

RE: Different log files for different web applications under Tomcat

2006-02-27 Thread Bender Heri
Does Tomcat start a separate JVM for each WEB-INF application? If not, your suggestion would not work since Log4j is global within one JVM. Heri -Original Message- From: Javier Gonzalez [mailto:[EMAIL PROTECTED] Sent: Monday, February 27, 2006 4:47 PM To: Log4J Users List Subject:

RE: Different log files for different web applications under Tomcat

2006-02-27 Thread Bender Heri
to support my point ;) But you made me remember an important point - log4j.jar must be only inside the contexts, and not in $TOMCAT_HOME/common/lib or $TOMCAT_HOME/shared/lib On 2/27/06, Bender Heri [EMAIL PROTECTED] wrote: Does Tomcat start a separate JVM for each WEB-INF application

RE: RollingFileAppender trigger to rollover

2006-03-01 Thread Bender Heri
Yes, since there is no timer running which triggers the rollover at a certain point of date. Only if a new log event occurs the appender checks the date and decides to rollover if needed. Heri -Original Message- From: Dirk Ooms [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 01,

RE: different log4J log files for same application

2006-03-06 Thread Bender Heri
This issue was discussed last week extensively. See mail archive. Heri -Original Message- From: waltz co [mailto:[EMAIL PROTECTED] Sent: Monday, March 06, 2006 5:26 AM To: log4j-user@logging.apache.org Subject: different log4J log files for same application hi, i have an

RE: Using the same tables for log4j with JDBC appender and Log4PLSQL

2006-03-08 Thread Bender Heri
configured all that. Also, is there no performance hit with all that logging from java to the db? Rakesh Bender Heri wrote: I dont use log4plsql, but I have a System which logs by a JDBC-Appender to a Oracle-Table, and the stored procedures within Oracle log exceptions to the same

RE: Using the same tables for log4j with JDBC appender and Log4PLSQL

2006-03-08 Thread Bender Heri
I have not noticed a performance impact, since we log only WARN, ERROR, and FATAL into DB. And this occurs not that often. Heri -Original Message- From: Rakesh Patel [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 08, 2006 2:50 PM To: Log4J Users List Subject: Re: Using the same

RE: Using multiple log4j.properties files

2006-03-09 Thread Bender Heri
Log4j is a singleton within the same JVM, more precise in each classloader of the JVM running. So you can have only one configuration. To give more help you must provide more details about your application and your goal. Heri -Original Message- From: Asaf Lahav [mailto:[EMAIL PROTECTED]

RE: log file is huge

2006-03-15 Thread Bender Heri
Log4j offers you very far reaching possibilities to finetune your log output and log destinations only by config file if you use the logging framework within your code like it is forseen, i.e. fetching the loggers by using the full qualified class name. Then you can configure the log level of

RE: How to implement multiple loggers per class?

2006-04-24 Thread Bender Heri
Hi you are free to choose a logger's name as you like. The convenience to name the loggers by the FQN of the surrounding class is useful for your first goal (debugging log). To treat some special log outputs I suggest to introduce a separate logger with a clear name, let's say UserAudit. The

RE: Serialized Objects

2006-04-27 Thread Bender Heri
The formal paramter of the log calls is Object. You can pass any object you like. The default renderer will then call toString() of this object. If you want to have annother rendering, you have to write your own one and declare it in the configuration file: renderer

RE: ObjectRenderer

2006-05-02 Thread Bender Heri
Your output looks like the default toString() result. So I guess your renderer is not called. How looks your definition? This definition works for me: renderer renderedClass=ch.ergonomics.pms.common.supervision.MessageLogger

RE: Defining fileappender in log4j.xml

2006-05-09 Thread Bender Heri
param name=File value=folder/workshop_test.log / should do the trick (slash instead of '.'). Log4j does not create folders if they do not exist. So must assure this folder exists before initializing log4j. Heri -Original Message- From: news [mailto:[EMAIL PROTECTED] Behalf Of ks

RE: why my logger doesn't get executed??

2006-05-11 Thread Bender Heri
How does your config file look? Heri -Original Message- From: Zheng Wen Zhe [mailto:[EMAIL PROTECTED] Sent: Thursday, May 11, 2006 5:16 PM To: 'Log4J Users List' Subject: why my logger doesn't get executed?? Hi all, This is my A Java class with logger resides. My question

RE: [SPAM (Bayesain Analysis)] - Best practice on declaring Loggers - Bayesian Filter detected spam

2006-06-13 Thread Bender Heri
If you use log4j without any extras it's good practice to declare the logger as private static final Logger myLog = Logger.getLogger( MyClass.class ); private: because every descendant in class hierarchie can have its own logger instance (i.e. for fintuning the log levels) static: because

RE: [SPAM (Bayesain Analysis)] - Re: Encryption of log - Bayesian Filter detected spam

2006-06-15 Thread Bender Heri
its a typo an should spell CipherOutputStream. It is used in framework java crypto extension (javax.crypto) -Original Message- From: xhu1 [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 14, 2006 7:24 PM To: Log4J Users List Subject: [SPAM (Bayesain Analysis)] - Re: Encryption of log

Logfiles sometimes overwritten at server restart

2006-06-28 Thread Bender Heri
Hi all I use log4j 1.2.8 in a server environement with DailyRollingFileAppenders. Although the property Append is set to true, the logfiles are sometimes overwritten on restart of the server application. I cannot reproduce this problem, it just happens occasionally. Here the excerpt of my

RE: [SPAM (Bayesain Analysis)] - RE: Logfiles sometimes overwritten at server restart - Bayesian Filter detected spam

2006-06-28 Thread Bender Heri
The problem is not that it does not roll over at midnight (this works perfectly) but that the log file from the very same day is overwritten when restarting the application. Heri -Original Message- From: Lewis, Cory (Genworth) [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 28, 2006

RE: Same configuration file for application running in different JVMs

2006-06-28 Thread Bender Heri
Imagine: Two processes own a file handle to the same file. I wonder that not already the concurrent writing gives problems. But if one process wants to rename the file, this can't become good in each case. (this is a OS and Filesystem issue and not a Log4j issue). If you want two JVM writing

RE: NoClassDefFound Error for org/apache/log4j/Layout

2006-06-29 Thread Bender Heri
It's not enough to just put it in the lib dir, you must include it in your classpath. Heri -Original Message- From: venkatlakshmi [mailto:[EMAIL PROTECTED] Sent: Thursday, June 29, 2006 1:55 PM To: log4j-user@logging.apache.org Subject: NoClassDefFound Error for

RE: [SPAM (Bayesain Analysis)] - problems with logging - Bayesian Filter detected spam

2006-07-03 Thread Bender Heri
You didn't attach any appender to the loggers except the rootLogger. It should look like this: log4j.logger.org.apache.commons.httpclient=DEBUG, stdout Probably you also want to set additivity of this logger to false, otherwise log entries it would appear twice in stdout (one time by this

RE: log4j custom filters how to?

2006-07-04 Thread Bender Heri
If you use xml configuration file you can attach one ore more self written filter class(es): example: appender name=CONSOLE.OUT class=org.apache.log4j.ConsoleAppender param name=target value=System.out/ layout class=org.apache.log4j.PatternLayout param

RE: [SPAM (Bayesain Analysis)] - Using XML configurations - Bayesian Filter detected spam

2006-07-06 Thread Bender Heri
Don't know if this is related to your problem, but I think you must declare the appender before the logger (root) Heri -Original Message- From: chuanjiang lo [mailto:[EMAIL PROTECTED] Sent: Thursday, July 06, 2006 4:54 PM To: log4j-user@logging.apache.org Subject: [SPAM (Bayesain

RE: [SPAM (Bayesain Analysis)] - Using XML configurations - Bayesian Filter detected spam

2006-07-06 Thread Bender Heri
Do you use the log4j class PropertyConfigurator within your code? Then you would have to change this to DOMConfigurator. Heri -Original Message- From: chuanjiang lo [mailto:[EMAIL PROTECTED] Sent: Thursday, July 06, 2006 4:54 PM To: log4j-user@logging.apache.org Subject: [SPAM

RE: Log4j - differnet log files

2006-07-11 Thread Bender Heri
this issue was discussed a lot on this list. Search for items RepositorySelector, MDC, Classloader; contributions by me and Javier Gonzalez. Titles: Use different log files inside one program, Different log files for different web applications under Tomcat Heri -Original Message-

Re: Filtering out data while logging

2006-07-12 Thread Bender Heri
I would chose the approach by a self written renderer, which is configured like this: renderer renderedClass=ch.ergonomics.pms.common.supervision.MessageLogger renderingClass=ch.ergonomics.pms.common.supervision.MessageLogger/ The rendering class is your self written renderer which

RE: my owen loggerclass

2006-07-13 Thread Bender Heri
first, extending Logger class is discouraged. You should wrap the logger class if you want to do generic work on each logger call. Best practice would be, to pass the correct logger in each call to debug() etc. So you can benefit of finetuning the logger output by classes and packages. second:

RE: logger and appender level conflicts

2006-07-17 Thread Bender Heri
I would suggest following: PackageAppender (threshold DEBUG) + Filter: DENY = (event.getLoggerName() eq. com.package.class2 ) and (event.getLevel() = DEBUG) DebugAppender (threshold DEBUG) Logger com.package with appender PackageAppender,

RE: High performance filters

2006-07-19 Thread Bender Heri
I would write a helper class with a static interface: public boolean static isLoggingEnabled( Logger aLog, Level aLevel ) { ... } where you check your conditions. The call within code could the look like: NDC.push(source-ip= + request.getSourceAddress()); if

RE: High performance filters

2006-07-19 Thread Bender Heri
Very nice, indeed, but it doesn't apply to existing logging code neither... Heri -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 19, 2006 6:33 PM To: log4j-user@logging.apache.org Subject: RE: High performance filters I tried and

RE: [SPAM (Bayesain Analysis)] - RE: Programmatically change properties of an appender - Bayesian Filter detected spam

2006-08-16 Thread Bender Heri
The problem is to find the appender instance. Remember that log4j holds the instantiated loggers within a hierarchy based on the logger name where the '.' describes a new level of the hierarchy. If you configure a logger i.e. com.foo.bar.MyPackage and assign an appender to it (=Logger A), and

RE: [SPAM (Bayesain Analysis)] - different logfile - Bayesian Filter detected spam

2006-08-16 Thread Bender Heri
Hi If your application is single threaded, means only one activity occurs at the sime time, you easily can use NDC and Filters: Declare one appender per activity which filters only the messages of the belonging activity. The needed NDC value is set at the beginning of activity and removed at

RE: network using appenders when network is down

2006-08-16 Thread Bender Heri
Subclass the SMTP appender for catching any send errors and retry send the log message to Localmachine, where a you provide a listener which logs into a file. Heri -Original Message- From: Takacs Bence [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 16, 2006 2:22 PM To: Log4J Users

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 );

RE: NTEventLogAppender Usage for Custom Event Log Reporting

2006-08-24 Thread Bender Heri
my logs to a Custom created Event log of my own. Can you help in this regards ? Thanks and Best Regards, Amit Pathak -Original Message- From: Bender Heri [mailto:[EMAIL PROTECTED] Sent: Thursday, August 24, 2006 4:55 PM To: Log4J Users List Subject: RE: NTEventLogAppender

RE: [SPAM (Bayesain Analysis)] - HowTo Disable Logging Output for classes using commons.logging - Bayesian Filter detected spam

2006-08-29 Thread Bender Heri
You have to set the additivity property of the quartz- and apache-Logger to false. Otherwise a log request would climb up the hierarchy until root logger. I am not quite shure about syntax in property file (I work with xml), something like log4j.logger.org.quartz.additivity=false. You have to

Implement my own logger repository?

2006-09-05 Thread Bender Heri
You cannot set your own LoggerRepository, but your own RepositorySelector, somewhere at the beginning of your main application: private static Object guard = new Object(); static { LogManager.setRepositorySelector( new MyRepositorySelector(), guard ); } When asking

How configure the categories for console, logFile and htmlFile showing different levels

2006-09-14 Thread Bender Heri
Since you defined additivity=false on your com.schinvest Logger, the log messages don't reach the root logger. Your goal can be achieved by xml configuration where you can declare filters on appenders. So you only declare a root logger with debug level and a net.sf logger with warn level. On

Sending special messages to a different appender

2006-09-14 Thread Bender Heri
declare a separate logger with your SPECIAL_APPENDER attached and additivity flag false. You are not forced to use the classname as logger name. You can choose any string (i.e. SPECIAL_LOGGER). Heri -Original Message- From: Bryce Nesbitt [mailto:[EMAIL PROTECTED] Sent: Thursday,

RE: How configure the categories for console, logFile and htmlFile showing different levels

2006-09-14 Thread Bender Heri
Here is an example of an xml configuration which uses filters (BTW: Using this two appenders when debugging in eclipse the console shows the DEBUG and INFO in black color and the others in red color). You can also write your own filter class where you are free to filter what you want. Be

Enhanced FileAppender (Was: Separate log files per thread.)

2006-09-18 Thread Bender Heri
This problem arises often. Some want to separate the log files of servlets by different criterias (sessionID, userID, etc.), others (like me) have a scheduler which fires different tasks on different customers where the log output should be separated. I thought one could enhance the file

Re: How to filter specific characters to not to log

2006-09-18 Thread Bender Heri
Can you explain where these characters occur? Are they within a String supplied as msg argument in log calls? Or where? Heri -Original Message- From: Praveen Kumar Hasthalapuram [mailto:[EMAIL PROTECTED] Sent: Monday, September 18, 2006 4:02 PM To: log4j-user@logging.apache.org

Re: How to filter specific characters to not to log

2006-09-20 Thread Bender Heri
A common way to enter binary data in xml is - use base64 encoding (not readable for humans, size is one third bigger than original) - translate to hex string (readable for humans, size is twice as big than original) Heri -Original Message- From: Praveen Kumar Hasthalapuram

Re: problem with alternative log4j.properties-file

2006-09-20 Thread Bender Heri
1. It is not recommended to subclass Logger. It would be better to write a Wrapper if you have particular business rules to implement. 2. In order to analyze your problem you should provide more details: - original property file - alternative property file - name(s) of involved loggers - Where

logging into different files

2006-10-11 Thread Bender Heri
This was discussed a lot on this list. Search in archive, keywords: MDC, RepositorySelector, different files. We currently discuss on the developper list the introduction of a MultiFileAppender which addresses just your need. But the work is still in progress... Heri -Original

RE: configuration file in Eclipse

2006-10-23 Thread Bender Heri
I assume this is a classpath issue. How do you use your path reference? How do you load the property file? Heri -Original Message- From: Ben Lajeunesse [mailto:[EMAIL PROTECTED] Sent: Monday, October 23, 2006 4:56 PM To: log4j-user@logging.apache.org Subject: [SPAM (Bayesain

RE: [SPAM (Bayesain Analysis)] - Logging Cross Functional categories in log4j - Bayesian Filter detected spam

2006-10-25 Thread Bender Heri
Already considered to use MDC? i.e.: MDC.put( category_tech, EJB ) MDC.put( category_func, Plan ) try { myLog.x } finally { MDC.remove( category_tech ); MDC.remove( category_func ); } The pattern can resolve this MDC values with the %X switch: %X{category_tech} %X{category_func}

Re: Logging Cross Functional categories in log4j

2006-10-25 Thread Bender Heri
partitions like Accounts,Servicing,Plan,Infrastructure etc, would it be possible if i use MDC values? On 10/25/06, Bender Heri [EMAIL PROTECTED] wrote: Already considered to use MDC? i.e.: MDC.put( category_tech, EJB ) MDC.put( category_func, Plan ) try { myLog.x

Re: Log4J System alerts

2006-11-30 Thread Bender Heri
Here a example how to configure filters. Note: Filters are only available if you use xml configuration. appender name=CONSOLE.OUT class=org.apache.log4j.ConsoleAppender param name=target value=System.out/ layout class=org.apache.log4j.PatternLayout param

  1   2   >