logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bender Heri" <HBen...@Ergonomics.ch>
Subject RE: enable filter
Date Wed, 01 Feb 2006 14:38:44 GMT
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 annother logger, only log output from this class will be written to this appender, provided
you get the logger like

Logger logger = Logger.getLogger( this.getClass.getName() );

If the naming of the logger in property file would be "org.jboss.deployment", all classes
within this package would be write to the attached appender(s). Like this you can finetune
your logging very deeply.

Heri


> -----Original Message-----
> From: Pedro Costa [mailto:pedro.costa@link.pt]
> Sent: Wednesday, February 01, 2006 3:11 PM
> To: log4j-user@logging.apache.org
> Subject: enable filter
> 
> 
> 
> In my log file, I have this lines.
> 
> 13:41:55,291 DEBUG [org.jboss.deployment.MainDeployer]
> (MainDeployer.java:816) Starting deployment (init step) of package at:
> file:/C:/jboss-4.0.3SP1/server/bem-sigo/deploy/ejb3.deployer/
> 13:41:55,291 DEBUG [org.jboss.deployment.MainDeployer]
> (MainDeployer.java:1045) using deployer
> org.jboss.deployment.SARDeployer@18941f7
> 13:41:55,307 DEBUG
> [org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread]
> (AbstractDeploymentScanner.java:163) Running
> 13:41:55,307 DEBUG
> [org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread]
> (AbstractDeploymentScanner.java:173) Disabled, waiting for 
> notification
> 13:41:55,307 DEBUG [org.jboss.deployment.SARDeployer] 
> (SARDeployer.java:569)
> Updated watch URL to:
> file:/C:/jboss-4.0.3SP1/server/bem-sigo/deploy/ejb3.deployer/M
> ETA-INF/jboss-
> service.xml
> 13:41:55,307 DEBUG [org.jboss.deployment.SARDeployer] 
> (SARDeployer.java:180)
> about to copy 0 local directories
> 13:41:55,307 DEBUG [org.jboss.deployment.SubDeployerSupport]
> (SubDeployerSupport.java:337) looking for nested deployments in :
> file:/C:/jboss-4.0.3SP1/server/bem-sigo/deploy/ejb3.deployer/
> 
> 
> But, what I want is that my log file should only have lines 
> which have the
> class org.jboss.deployment.MainDeployer written. Is it 
> possible to enable a
> filter in the log4j.xml for this?
> 
> Thanks,
> 
> -----------------
> PSC 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 
> 

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