Legolas Woodland | 1 Jan 2006 22:56
Picon

[chainsaw]How i can view Tomcat log file in Chainsaw

Hi
Thank you for reading my post.
I'm developing an application in tomcat.
i need to always look at tomcat log file and refresh the log file 
continuously.
now i find out that chainsaw can show a log file very clearly , but i do 
not know how to configure it to show tomcat log file.
can some one please give me a sample configuration file ?

Thank you
Scott Deboy | 2 Jan 2006 00:30

RE: [chainsaw]How i can view Tomcat log file in Chainsaw

LogFilePatternReceiver is the 'receiver' that makes log files available in Chainsaw.

You can find an example configuration file from inside Chainsaw:
http://logging.apache.org/log4j/docs/chainsaw.html

You can find an example Chainsaw configuration file that includes an example LogFilePatternReceiver
section by selecting the 'view example configuration file' button on the Welcome tab's toolbar.  

You can also view the LogFilePatternReceiver JavaDoc from inside Chainsaw via the Help menu.

Post a few entries from your log file and I can give you an example 'logFormat'.

Scott
-----Original Message-----
From: Legolas Woodland [mailto:legolas.w <at> gmail.com]
Sent: Sun 1/1/2006 1:56 PM
To: log4j-user <at> logging.apache.org
Subject: [chainsaw]How i can view Tomcat log file in Chainsaw 

Hi
Thank you for reading my post.
I'm developing an application in tomcat.
i need to always look at tomcat log file and refresh the log file 
continuously.
now i find out that chainsaw can show a log file very clearly , but i do 
not know how to configure it to show tomcat log file.
can some one please give me a sample configuration file ?

Thank you

(Continue reading)

Legolas Woodland | 2 Jan 2006 09:30
Picon

Re: [chainsaw]How i can view Tomcat log file in Chainsaw

Scott Deboy wrote:
> LogFilePatternReceiver is the 'receiver' that makes log files available in Chainsaw.
>
> You can find an example configuration file from inside Chainsaw:
> http://logging.apache.org/log4j/docs/chainsaw.html
>
> You can find an example Chainsaw configuration file that includes an example LogFilePatternReceiver
section by selecting the 'view example configuration file' button on the Welcome tab's toolbar.  
>
> You can also view the LogFilePatternReceiver JavaDoc from inside Chainsaw via the Help menu.
>
> Post a few entries from your log file and I can give you an example 'logFormat'.
>
> Scott
>   

Thank you for reply.
I want to see tomcat server.log , as you know it is located in 
tomcat_home\logs .
is it possible to view it in chainsaw or it need some programming ?

> -----Original Message-----
> From: Legolas Woodland [mailto:legolas.w <at> gmail.com]
> Sent: Sun 1/1/2006 1:56 PM
> To: log4j-user <at> logging.apache.org
> Subject: [chainsaw]How i can view Tomcat log file in Chainsaw 
>  
> Hi
> Thank you for reading my post.
> I'm developing an application in tomcat.
(Continue reading)

Patrizio.Ferlito | 2 Jan 2006 11:24
Picon
Favicon

loading log4j.properties from an ear file


Hello,

I developed a very simple ear application that includes a web app and a
stateless EJB.

The EJB uses log4j.

This application runs in weblogic8.1 server. I am using
log4j-1.2.13.jar.

The ear structure is as follows:

C:\software\bea8\config\local\applications>jar tvf RuleApp.ear
     0 Mon Jan 02 11:07:56 CET 2006 META-INF/
    79 Mon Jan 02 11:07:54 CET 2006 META-INF/MANIFEST.MF
   466 Thu Dec 22 18:13:44 CET 2005 META-INF/application.xml
  4725 Mon Jan 02 11:07:56 CET 2006 RuleAppWeb.war
  6955 Mon Jan 02 11:07:56 CET 2006 RuleService.jar
     0 Mon Jan 02 11:08:02 CET 2006 etc/
     0 Mon Jan 02 11:08:02 CET 2006 etc/properties/
  2340 Mon Jan 02 11:08:02 CET 2006 etc/properties/log4j.properties
358180 Sun Dec 04 19:00:48 CET 2005 log4j-1.2.13.jar
  1278 Mon Jan 02 11:07:52 CET 2006 utils.jar

Inside the EJB (RuleService), in order to load the log4j.properties
file, I do:

    	if (logger == null)
    	{
(Continue reading)

Scott Deboy | 2 Jan 2006 12:41

RE: [chainsaw]How i can view Tomcat log file in Chainsaw

LogFilePatternReceiver allows Chainsaw to view logs accessible as a URL (file or http).

If the log file is available via ssh or another file system supported by Commons VFS, you can use
org.apache.log4j.chainsaw.vfs.VFSLogFilePatternReceiver to access it.

Neither require programming - just the creation of an xml configuration file specifying the file format,
location, etc.  

See the receiver JavaDoc (in Chainsaw under the help menu) for more information (to use
VFSLogFilePatternReceiver, you will need to download Chainsaw and modify the classpath - at least until
the next update to the WebStart version of Chainsaw).

Scott

-----Original Message-----
From: Legolas Woodland [mailto:legolas.w <at> gmail.com]
Sent: Mon 1/2/2006 12:30 AM
To: Log4J Users List
Subject: Re: [chainsaw]How i can view Tomcat log file in Chainsaw

Scott Deboy wrote:
> LogFilePatternReceiver is the 'receiver' that makes log files available in Chainsaw.
>
> You can find an example configuration file from inside Chainsaw:
> http://logging.apache.org/log4j/docs/chainsaw.html
>
> You can find an example Chainsaw configuration file that includes an example LogFilePatternReceiver
section by selecting the 'view example configuration file' button on the Welcome tab's toolbar.  
>
> You can also view the LogFilePatternReceiver JavaDoc from inside Chainsaw via the Help menu.
(Continue reading)

Picon

Re: Logging custom levels using log4j

Thanks Scott,

Currenlty we are using log4j1.2  , but to support filters we need to use
log4j1.3 right?
Will it be major changes needed to change it to higher version?

And currently we are using log4j.properties for all types of logging.
In addition to that, to configure filters, we need to use log4j.xml for
configuring.

Can we have both the type of configurations? (i.e log4j.xml for filters and
log4j.properties for others)

Which one will take precedence?

Regards,
Praveen

On 12/30/05, Scott Deboy <sdeboy <at> comotivsystems.com> wrote:
>
> I don't think you can specify filters in the properties file format - use
> an xml config file instead.
>
> Here's an example:
>
> <appender name="someAppender" class="org.apache.log4j.FileAppender">
>     <layout class="org.apache.log4j.SimpleLayout"/>
> <filter class="org.apache.log4j.varia.ExpressionFilter">
>        <param name="Expression" value="msg ~= blah" />
>        <param name="AcceptOnMatch" value="true"/>
(Continue reading)

Jacob Kjome | 2 Jan 2006 17:11
Favicon

Re: loading log4j.properties from an ear file

At 11:24 AM 1/2/2006 +0100, you wrote:
 >
 >Hello,
 >
 >I developed a very simple ear application that includes a web app and a
 >stateless EJB.
 >
 >The EJB uses log4j.
 >
 >This application runs in weblogic8.1 server. I am using
 >log4j-1.2.13.jar.
 >
 >The ear structure is as follows:
 >
 >C:\software\bea8\config\local\applications>jar tvf RuleApp.ear
 >     0 Mon Jan 02 11:07:56 CET 2006 META-INF/
 >    79 Mon Jan 02 11:07:54 CET 2006 META-INF/MANIFEST.MF
 >   466 Thu Dec 22 18:13:44 CET 2005 META-INF/application.xml
 >  4725 Mon Jan 02 11:07:56 CET 2006 RuleAppWeb.war
 >  6955 Mon Jan 02 11:07:56 CET 2006 RuleService.jar
 >     0 Mon Jan 02 11:08:02 CET 2006 etc/
 >     0 Mon Jan 02 11:08:02 CET 2006 etc/properties/
 >  2340 Mon Jan 02 11:08:02 CET 2006 etc/properties/log4j.properties
 >358180 Sun Dec 04 19:00:48 CET 2005 log4j-1.2.13.jar
 >  1278 Mon Jan 02 11:07:52 CET 2006 utils.jar
 >
 >Inside the EJB (RuleService), in order to load the log4j.properties
 >file, I do:
 >
 >       if (logger == null)
(Continue reading)

Scott Deboy | 2 Jan 2006 17:22

RE: Logging custom levels using log4j

Filters are supported in 1.2 - ExpressionFilter is new with 1.3.

I wouldn't use 1.3 in production - it's still at an alpha release.

I believe you can't configure filters via a properties file - you need to use an xml configuration file.

If you have an xml file and a properties file, only the xml configuration will be used.

Scott

-----Original Message-----
From: Praveen Kumar Hasthalapuram [mailto:praveen.hasthal <at> gmail.com]
Sent: Mon 1/2/2006 7:48 AM
To: Log4J Users List
Subject: Re: Logging custom levels using log4j

Thanks Scott,

Currenlty we are using log4j1.2  , but to support filters we need to use
log4j1.3 right?
Will it be major changes needed to change it to higher version?

And currently we are using log4j.properties for all types of logging.
In addition to that, to configure filters, we need to use log4j.xml for
configuring.

Can we have both the type of configurations? (i.e log4j.xml for filters and
log4j.properties for others)

Which one will take precedence?
(Continue reading)

Mark Womack | 3 Jan 2006 03:08
Picon
Favicon

log4j 1.3 status update

Work continues on the next major version of log4j, 1.3.  Going forward there 
will be monthly builds of 1.3, taking place on the last Wednesday of the 
month.  More builds may be done as needed.

The current focus of work for 1.3 is to restore most compatibility with 
version 1.2.X.  These changes are under discussion on the log4j-dev email 
list, and we invite you to follow and participate if you want.

There will likely be some changes that may affect "drop in" compatibility, 
especially if the changes are needed to support important new features we 
are adding.  We will doing a better job of documenting these changes and 
getting feedback from all of you as to how much of an effect it will have. 
A goal is to make it easier to transition to version 1.3 than it is in the 
current alpha 7 version.

thanks,
-Mark 
George Sebastian | 3 Jan 2006 10:03
Picon

Issue with creating new hierarchy of loggers

Hi ,
I want to create a new Hierarchy of loggers and I am doing something like
this

 private static Hierarchy h =new Hierarchy(new RootLogger(Level.DEBUG));
   Logger logger =h.getLogger (XX.class.getName ());

  PropertyConfigurator.configure(xxxxxx.properties);

How do i need to put in the xxxxxx.properties to add an appender  to my
rootLogger ( I mean root Logger of my Hierarchy)

I added some thing like this and is not working( I mean appender is not
added to the root logger and child loggers )

log4j.rootLogger=DEBUG , A1
log4j.debug=true
#A1

# A1 is set to be a FileAppender sending its output to
# System.out. However, only error messages and above will be printed
# in A1 because A1's threshold is set to Level.ERROR.

# The fact that the root level is set to Prority.DEBUG only influences
# log requests made to the root logger. It has no influence on the
# *appenders* attached to root.

log4j.appender.A1=com.xx.log4link.appender.MyAppender

And while doing so and testing I am getting warning stating no appenders
(Continue reading)


Gmane