ceki        02/03/18 09:14:31

  Modified:    examples Sort.java
  Added:       examples sort1.properties sort2.properties sort3.properties
                        sort4.properties
  Removed:     examples sort1.lcf sort2.lcf sort3.lcf sort4.lcf
  Log:
  Renamed files, cleaned up some commentary in the examples.
  
  Revision  Changes    Path
  1.6       +4 -4      jakarta-log4j/examples/Sort.java
  
  Index: Sort.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/examples/Sort.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Sort.java 21 Jan 2002 11:20:58 -0000      1.5
  +++ Sort.java 18 Mar 2002 17:14:30 -0000      1.6
  @@ -18,10 +18,10 @@
      watch the changing behavior.
   
      <p>Example configuration files can be found in <a
  -   href="doc-files/sort1.lcf">sort1.lcf</a>, <a
  -   href="doc-files/sort2.lcf">sort2.lcf</a>, <a
  -   href="doc-files/sort3.lcf">sort3.lcf</a> and <a
  -   href="doc-files/sort4.lcf">sort4.lcf</a> are supplied with the
  +   href="doc-files/sort1.properties">sort1.properties</a>, <a
  +   href="doc-files/sort2.properties">sort2.properties</a>, <a
  +   href="doc-files/sort3.properties">sort3.properties</a> and <a
  +   href="doc-files/sort4.properties">sort4.properties</a> are supplied with the
      package.
      
      <p>If you are also interested in logging performance, then have
  
  
  
  1.1                  jakarta-log4j/examples/sort1.properties
  
  Index: sort1.properties
  ===================================================================
  # An example log4j configuration file that outputs to System.out.  The
  # output information consists of relative time, log level, thread
  # name, logger name, nested diagnostic context and the message in that
  # order.
  
  # For the general syntax of property based configuration files see the
  # documenation of org.apache.log4j.PropertyConfigurator.
  
  log4j.rootLogger=DEBUG, A1
  
  # A1 is set to be a ConsoleAppender which outputs to System.out. 
  log4j.appender.A1=org.apache.log4j.ConsoleAppender
  
  # A1 uses PatternLayout.
  log4j.appender.A1.layout=org.apache.log4j.PatternLayout
  
  # The conversion pattern uses format specifiers. You might want to
  # change the pattern an watch the output format change.
  log4j.appender.A1.layout.ConversionPattern=%-4r %-5p [%t] %37c %3x - %m%n
  
  # In this example, we are not really interested in INNER loop or SWAP
  # messages. See the effects of uncommenting and changing the levels of
  # the following loggers.
  # log4j.logger.org.apache.log4j.examples.SortAlgo.INNER=WARN
  # log4j.logger.org.apache.log4j.examples.SortAlgo.SWAP=WARN
   
  
  
  1.1                  jakarta-log4j/examples/sort2.properties
  
  Index: sort2.properties
  ===================================================================
  # An example log4j configuration file that outputs both to System.out
  # and a file named 'test'.
  
  # For the general syntax of property based configuration files see the
  # documenation of org.apache.log4j.PropertyConfigurator.
  
  # WARNING: Location information can be useful but is very costly in
  # terms of computation.
  
  # The root logger uses the appender called A1. 
  
  # The root logger uses the appenders called A1 and A2. Since no level
  # is specified, note the empty string between the comma (",") and the
  # equals sign ("="), the level of the root logger remains
  # untouched. Log4j always initializes the level for the root logger to
  # DEBUG. The root logger is the only logger that has a default
  # level. Bu default, all other loggers do not have an assigned level,
  # such that they inherit their level instead.
  
  log4j.rootLogger=, A1, A2
  
  # A1 is set to be ConsoleAppender sending its output to System.out
  log4j.appender.A1=org.apache.log4j.ConsoleAppender
  
  
  # A1 uses PatternLayout.
  log4j.appender.A1.layout=org.apache.log4j.PatternLayout
  
  # The conversion pattern consists of date in ISO8601 format, level,
  # thread name, logger name truncated to its rightmost two components
  # and left justified to 17 characters, location information consisting
  # of file name (padded to 13 characters) and line number, nested
  # diagnostic context, the and the application supplied message
  
  log4j.appender.A1.layout.ConversionPattern=%d %-5p [%t] %-17c{2} (%13F:%L) %3x - %m%n
  
  # Appender A2 writes to the file "test".
  log4j.appender.A2=org.apache.log4j.FileAppender
  log4j.appender.A2.File=test
  
  # Truncate 'test' if it aleady exists.
  log4j.appender.A2.Append=false
  
  # Appender A2 uses the PatternLayout.
  log4j.appender.A2.layout=org.apache.log4j.PatternLayout
  log4j.appender.A2.layout.ConversionPattern=%-5r %-5p [%t] %c{2} - %m%n
  
  
  # In this example, we are not interested in INNER loop or SWAP
  # messages.  You might try to set INNER and SWAP to DEBUG for more
  # verbose output.
  
  log4j.logger.org.apache.log4j.examples.SortAlgo.INNER=INFO
  log4j.logger.org.apache.log4j.examples.SortAlgo.SWAP=INFO
  
  
  
  1.1                  jakarta-log4j/examples/sort3.properties
  
  Index: sort3.properties
  ===================================================================
  # An example log4j configuration file that directs its logging output
  # to a SocketAppender. The SocketAppender is configuted to send its
  # output to a server running on the localhost port number 12345.
  
  # To test this example, you must start a log4j server with the command
  #
  #
  #  java org.apache.log4j.net.SocketServer 12345 configurationFile directory/
  #
  #
  
  # For the general syntax of property based configuration files see
  # the documenation of org.apache.log4j.PropertyConfigurator.
  
  # The root logger uses the appender called A1. 
  
  log4j.rootLogger=DEBUG, A1
  
  # A1 is set to be a SocketAppender sending its output to the server
  running on the local host, port 12345.
  
  log4j.appender.A1=org.apache.log4j.net.SocketAppender
  log4j.appender.A1.Port=12345
  log4j.appender.A1.RemoteHost=localhost
  
  # In this example, we are not interested in INNER loop or SWAP
  # messages.  You might try to set INNER and SWAP to DEBUG for more
  # verbose output.
  
  log4j.logger.org.apache.log4j.examples.SortAlgo.INNER=INFO
  log4j.logger.org.apache.log4j.examples.SortAlgo.SWAP=INFO
  
  
  
  1.1                  jakarta-log4j/examples/sort4.properties
  
  Index: sort4.properties
  ===================================================================
  # Attach appender A1 to root. Set root level to Level.DEBUG.
  log4j.rootLogger=DEBUG, 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=org.apache.log4j.ConsoleAppender
  log4j.appender.A1.Threshold=ERROR
  
  log4j.appender.A1.layout=org.apache.log4j.PatternLayout
  log4j.appender.A1.layout.ConversionPattern=%p [%t] %c{2} (%M:%L) - %m%n
  
  # Set the level of the logger named "org.apache.log4j.examples" to 
  # Level.INFO, attach appender A2.
  log4j.logger.org.apache.log4j.examples=INFO, A2
  
  # Appender A2 writes to the file "test" in user's home.
  log4j.appender.A2=org.apache.log4j.FileAppender
  log4j.appender.A2.File=${user.home}/test
  
  # Truncate 'test' if it aleady exists.
  log4j.appender.A2.Append=false
  
  # Appender A2 uses the PatternLayout.
  log4j.appender.A2.layout=org.apache.log4j.PatternLayout
  log4j.appender.A2.layout.ConversionPattern=%5r %-5p [%t] %c{2} - %m%n
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to