Sensible Open Source

Blog Status

  • 6 yrs 43 wks 6 days old
  • Updated: 3 Feb 2012
  • 466 entries
  • 193 comments
Total: 2,261,922
since: 5 Apr 2005

LinkBlogS

Creating Vidcasts

18 June 2007, Monday 7:05 P GMT-06
Tags:      

Man, Can't Microsoft Catch A Break?

16 March 2007, Friday 12:26 P GMT-06

Viacom, Google andYou Tube, Oh My!

16 March 2007, Friday 12:25 P GMT-06

Switch to digital TV to start in October

16 March 2007, Friday 7:46 A GMT-06

Is the Ice Ready? No, Its Still To Hot To Use...

16 March 2007, Friday 7:43 A GMT-06

MIT Entire Curriculum At disposal of e-learners

6 March 2007, Tuesday 11:52 A GMT-06

A cure for e-mail attention disorder?

2 March 2007, Friday 12:51 A GMT-06
Tags:  

Windows-on-Mac software gets virtualization update

1 March 2007, Thursday 5:08 A GMT-06

EnterpriseDB is/n't Open Source

1 March 2007, Thursday 3:37 A GMT-06

BitTorrent download portal debuts

27 February 2007, Tuesday 9:05 A GMT-06

$45b TXU buyout

27 February 2007, Tuesday 9:02 A GMT-06

iPhone Competitors Got The Touch

26 February 2007, Monday 3:43 A GMT-06
Tags:        

HTC - Smart Mobility

25 February 2007, Sunday 4:22 A GMT-06

Hard to find 1-800 numbers

23 February 2007, Friday 8:35 A GMT-06

Cuba Embraces Open-Source Software

21 February 2007, Wednesday 3:10 A GMT-06

Vista at the tipping point, Err Dipping Point?

11 February 2007, Sunday 11:11 A GMT-06
Tags:  

PostgreSQL Open Source And Persistence

3 February 2007, Saturday 10:32 P GMT-06

Blackboard Pledges No Patent Blocks

3 February 2007, Saturday 10:28 P GMT-06

UVU

5 January 2007, Friday 11:58 P GMT-06

Open-source IP PBX software appliance"

4 January 2007, Thursday 3:44 A GMT-06

Asterisk an under-appreciated Open Source Success Story

4 January 2007, Thursday 3:43 A GMT-06

Open Source AJAX Tooling

4 January 2007, Thursday 3:41 A GMT-06

Google MAIL API Secuirty Alert

1 January 2007, Monday 7:37 P GMT-06
Tags:    

United States Patent Application: 0060288329

26 December 2006, Tuesday 4:00 A GMT-06

LinkBlog Popular Tags

                                       







Tomcat 5.5 Takes The Apache Avenue To Commons Logging

posted 27 January 2006, Friday
This is a quick reference to the loggind of Tomcat 5.5.

You will need to down load the following jars:

  1.  Apache Commons Logging  commons-logging.jar
  2.  Log4J (Wait A Mintue) *
    • This requires little discussion, see below
  3. Copy the commons logging and log4j jar in to the Tomcat  commons/lib directory : /usr/local/tomcat/common/lib
  4. Then copy the log4j configuration file depending on your version of log4j as discussed below:

At this point startup Tomcat and tail [Remember?] the tomcat.log to see that your configuration worked.  After you get it up and running read the docs to configure log4j for your personal liking!

*[When downloading insrure that the version dowload and the configuratin files match]:

A. When downloading log4j and choosing  log4j-1.2.13.jar the file  log4j.properties must be place in the Neptune:~ zapcaster$ ls /usr/local/tomcat/common/classes/. A sample configuration is below:

#
# Configures Log4j as the Tomcat system logge
#

#
# Configure the logger to output info level messages into a rolling log file.
#
log4j.rootLogger=INFO, R

#
# To continue using the "catalina.out" file (which grows forever),
# comment out the above line and uncomment the next.
#
#log4j.rootLogger=ERROR, A1

#
# Configuration for standard output ("catalina.out").
#
log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
#
# Print the date in ISO 8601 format
#
log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n

#
# Configuration for a rolling log file ("tomcat.log").
#
log4j.appender.R=org.apache.log4j.DailyRollingFileAppender
log4j.appender.R.DatePattern='.'yyyy-MM-dd
#
# Edit the next line to point to your logs directory.
# The last part of the name is the log file name.
#
log4j.appender.R.File=/usr/local/tomcat/logs/tomcat.log
log4j.appender.R.layout=org.apache.log4j.PatternLayout
#
# Print the date in ISO 8601 format
#
log4j.appender.R.layout.ConversionPattern=%d [%t] %-5p %c - %m%n

#
# Application logging options
#
#log4j.logger.org.apache=DEBUG
#log4j.logger.org.apache=INFO
#log4j.logger.org.apache.struts=DEBUG
#log4j.logger.org.apache.struts=INFO

The good news is this is how you can rename the file to your liking.  The bad news is, its not XML.  However, that is what the item B option is all about. Version log4j and choosing  logging-log4j-1.3alpha.



#
# Application logging options
#
#log4j.logger.org.apache=DEBUG
#log4j.logger.org.apache=INFO
#log4j.logger.org.apache.struts=DEBUG
#log4j.logger.org.apache.struts=INFO
Neptune:~ zapcaster$ cat ~/bin/xml.lotj_1.3.xml                           
<?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE configuration>
  <configuration xmlns="http://logging.apache.org/">
  <!-- <configuration xmlns="http://logging.apache.org/" debug="true"> -->
  <!-- Create a rolling file appender called "T" for the Tomcat system log -->
  <appender name="T" class="org.apache.log4j.rolling.RollingFileAppender">
   <!-- Log files should use today's date and rotate at midnight -->
     <rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
   <!-- Set the path and file name pattern for your Tomcat log files -->
      <param name="FileNamePattern" value="/usr/local/tomcat/logs/tomcat_nept_.%d.log"/>
     </rollingPolicy>

     <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%d [%t] %-5p %c - %m%n"/>
     </layout>
    </appender>

   <!-- Configure the root appender -->
    <root>
     <appender-ref ref="T"/>
 <!-- Set your root logging level: debug, info, warn, error or fatal -->
 <level value="info"/>
</root>

 <!-- Configure the log level for Struts -->
 <!--
 <logger name="org.apache.struts">
 <level value="debug"/>
 </logger >
-->

<!-- Configure the log level for Velocity -->
<!--
 <logger  name="org.apache.velocity.runtime.log.SimpleLog4JLogSystem">
 <level value="warn"/>
</logger >
 -->
</configuration>

tags:            

links: digg this    del.icio.us    technorati    reddit