Added: logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/spi/LoggerRepositoryEventListener.html URL: http://svn.apache.org/viewvc/logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/spi/LoggerRepositoryEventListener.html?view=auto&rev=558355 ============================================================================== --- logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/spi/LoggerRepositoryEventListener.html (added) +++ logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/spi/LoggerRepositoryEventListener.html Sat Jul 21 10:20:56 2007 @@ -0,0 +1,67 @@ + + + +LoggerRepositoryEventListener xref + + + +
View Javadoc
+
+1   /*
+2    * Licensed to the Apache Software Foundation (ASF) under one or more
+3    * contributor license agreements.  See the NOTICE file distributed with
+4    * this work for additional information regarding copyright ownership.
+5    * The ASF licenses this file to You under the Apache License, Version 2.0
+6    * (the "License"); you may not use this file except in compliance with
+7    * the License.  You may obtain a copy of the License at
+8    *
+9    *      http://www.apache.org/licenses/LICENSE-2.0
+10   *
+11   * Unless required by applicable law or agreed to in writing, software
+12   * distributed under the License is distributed on an "AS IS" BASIS,
+13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+14   * See the License for the specific language governing permissions and
+15   * limitations under the License.
+16   */
+17  
+18  package org.apache.log4j.spi;
+19  
+20  
+21  /***
+22    Interface used to listen for LoggerRepository related
+23    events such as startup, reset, and shutdown.  Clients register
+24    an instance of the interface and the instance is called back
+25    when the various events occur.
+26  
+27    LoggerRepository provides methods for adding and removing
+28    LoggerRepositoryEventListener instances.
+29  
+30    @author Ceki Gülcü
+31    @author Mark Womack
+32    @since 1.3
+33  */
+34  public interface LoggerRepositoryEventListener {
+35    /***
+36      Called when the repository configuration is reset.
+37     @param repository repository
+38     */
+39    void configurationResetEvent(LoggerRepository repository);
+40  
+41    /***
+42      Called when the repository configuration is changed.
+43     @param repository repository
+44     */
+45    void configurationChangedEvent(LoggerRepository repository);
+46  
+47    /***
+48      Called when the repository is shutdown. When this method is
+49      invoked, the repository is still valid (ie it has not been
+50      shutdown, but will be after this method returns).
+51      @param repository repository.
+52     */
+53    void shutdownEvent(LoggerRepository repository);
+54  }
+
+
+ + Propchange: logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/spi/LoggerRepositoryEventListener.html ------------------------------------------------------------------------------ svn:mime-type = text/html Added: logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/spi/LoggerRepositoryEx.html URL: http://svn.apache.org/viewvc/logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/spi/LoggerRepositoryEx.html?view=auto&rev=558355 ============================================================================== --- logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/spi/LoggerRepositoryEx.html (added) +++ logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/spi/LoggerRepositoryEx.html Sat Jul 21 10:20:56 2007 @@ -0,0 +1,223 @@ + + + +LoggerRepositoryEx xref + + + +
View Javadoc
+
+1   /*
+2    * Licensed to the Apache Software Foundation (ASF) under one or more
+3    * contributor license agreements.  See the NOTICE file distributed with
+4    * this work for additional information regarding copyright ownership.
+5    * The ASF licenses this file to You under the Apache License, Version 2.0
+6    * (the "License"); you may not use this file except in compliance with
+7    * the License.  You may obtain a copy of the License at
+8    *
+9    *      http://www.apache.org/licenses/LICENSE-2.0
+10   *
+11   * Unless required by applicable law or agreed to in writing, software
+12   * distributed under the License is distributed on an "AS IS" BASIS,
+13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+14   * See the License for the specific language governing permissions and
+15   * limitations under the License.
+16   */
+17  
+18  package org.apache.log4j.spi;
+19  
+20  import org.apache.log4j.Appender;
+21  import org.apache.log4j.Category;
+22  import org.apache.log4j.Logger;
+23  import org.apache.log4j.plugins.PluginRegistry;
+24  import org.apache.log4j.scheduler.Scheduler;
+25  
+26  import java.util.List;
+27  import java.util.Map;
+28  
+29  
+30  /***
+31     A <code>LoggerRepository</code> is used to create and retrieve
+32     <code>Loggers</code>. The relation between loggers in a repository
+33     depends on the repository but typically loggers are arranged in a
+34     named hierarchy.
+35  
+36     <p>In addition to the creational methods, a
+37     <code>LoggerRepository</code> can be queried for existing loggers,
+38     can act as a point of registry for events related to loggers.
+39  
+40     @author Ceki G&uuml;lc&uuml;
+41     @author Mark Womack
+42     @author Curt Arnold
+43     @since 1.3 */
+44  public interface LoggerRepositoryEx extends LoggerRepository {
+45    /***
+46      Add a {@link LoggerRepositoryEventListener} to the repository. The
+47      listener will be called when repository events occur.
+48       @param listener event listener, may not be null.
+49      @since 1.3*/
+50    void addLoggerRepositoryEventListener(
+51      LoggerRepositoryEventListener listener);
+52  
+53    /***
+54      Remove a {@link LoggerRepositoryEventListener} from the repository.
+55     @param listener listener.
+56      @since 1.3*/
+57    void removeLoggerRepositoryEventListener(
+58      LoggerRepositoryEventListener listener);
+59  
+60    /***
+61      Add a {@link LoggerEventListener} to the repository. The  listener
+62      will be called when repository events occur.
+63     @param listener listener, may not be null.
+64      @since 1.3*/
+65    void addLoggerEventListener(LoggerEventListener listener);
+66  
+67    /***
+68      Remove a {@link LoggerEventListener} from the repository.
+69     @param listener listener, may not be null.
+70      @since 1.3*/
+71    void removeLoggerEventListener(LoggerEventListener listener);
+72  
+73    /***
+74     * Get the name of this logger repository.
+75     * @return name, may not be null.
+76     * @since 1.3
+77     */
+78    String getName();
+79  
+80    /***
+81     * A logger repository is a named entity.
+82     * @param repoName new name, may not be null.
+83     * @since 1.3
+84     */
+85    void setName(String repoName);
+86  
+87    /***
+88     * Is the current configuration of the repository in its original (pristine)
+89     * state?
+90     * @return true if repository is in original state.
+91     *
+92     * @since 1.3
+93     */
+94    boolean isPristine();
+95  
+96    /***
+97     *  Set the pristine flag.
+98     * @param state state
+99     *  @see #isPristine
+100    *  @since 1.3
+101    */
+102   void setPristine(boolean state);
+103 
+104   /***
+105     Requests that a appender removed event be sent to any registered
+106     {@link LoggerEventListener}.
+107     @param logger The logger from which the appender was removed.
+108     @param appender The appender removed from the logger.
+109     @since 1.3*/
+110   void fireRemoveAppenderEvent(Category logger, Appender appender);
+111 
+112   /***
+113     Requests that a level changed event be sent to any registered
+114     {@link LoggerEventListener}.
+115     @param logger The logger which changed levels.
+116     @since 1.3*/
+117   void fireLevelChangedEvent(Logger logger);
+118 
+119   /***
+120     Requests that a configuration changed event be sent to any registered
+121     {@link LoggerRepositoryEventListener}.
+122     @since 1.3*/
+123   void fireConfigurationChangedEvent();
+124 
+125   /***
+126    * Return the PluginRegisty for this LoggerRepository.
+127    * @return plug in registry.
+128    * @since 1.3
+129    */
+130   PluginRegistry getPluginRegistry();
+131 
+132   /***
+133    * Return the {@link Scheduler} for this LoggerRepository.
+134    * @return scheduler.
+135    * @since 1.3
+136    */
+137   Scheduler getScheduler();
+138 
+139   /***
+140    * Get the properties specific for this repository.
+141    * @return property map.
+142    * @since 1.3
+143    */
+144   Map getProperties();
+145 
+146   /***
+147    * Get the property of this repository.
+148    * @param key property key.
+149    * @return key value or null if not set.
+150    * @since 1.3
+151    */
+152   String getProperty(String key);
+153 
+154   /***
+155    * Set a property of this repository.
+156    * @param key key, may not be null.
+157    * @param value new value, if null, property will be removed.
+158    * @since 1.3
+159    */
+160   void setProperty(String key, String value);
+161 
+162   /***
+163    * Errors which cannot be logged, go to the error list.
+164    *
+165    * @return List
+166    */
+167   List getErrorList();
+168 
+169   /***
+170    * Errors which cannot be logged, go to the error list.
+171    *
+172    * @param errorItem an ErrorItem to add to the error list
+173    */
+174   void addErrorItem(ErrorItem errorItem);
+175 
+176   /***
+177    * A LoggerRepository can also act as a store for various objects used
+178    * by log4j components.
+179    *
+180    * @param key key, may not be null.
+181    * @return The object stored under 'key'.
+182    * @since 1.3
+183    */
+184   Object getObject(String key);
+185 
+186   /***
+187    * Store an object under 'key'. If no object can be found, null is returned.
+188    *
+189    * @param key key, may not be null.
+190    * @param value value, may be null.
+191    */
+192   void putObject(String key, Object value);
+193 
+194   /***
+195    * Sets the logger factory used by LoggerRepository.getLogger(String).
+196    * @param loggerFactory factory to use, may not be null
+197    * @since 1.3
+198    */
+199   void setLoggerFactory(LoggerFactory loggerFactory);
+200 
+201   /***
+202    * Returns the logger factory used by
+203    * LoggerRepository.getLogger(String).
+204    *
+205    * @return non-null factory
+206    * @since 1.3
+207    */
+208   LoggerFactory getLoggerFactory();
+209 
+210 }
+
+
+ + Propchange: logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/spi/LoggerRepositoryEx.html ------------------------------------------------------------------------------ svn:mime-type = text/html Added: logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/spi/NOPULogger.html URL: http://svn.apache.org/viewvc/logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/spi/NOPULogger.html?view=auto&rev=558355 ============================================================================== --- logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/spi/NOPULogger.html (added) +++ logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/spi/NOPULogger.html Sat Jul 21 10:20:56 2007 @@ -0,0 +1,213 @@ + + + +NOPULogger xref + + + +
View Javadoc
+
+1   /*
+2    * Licensed to the Apache Software Foundation (ASF) under one or more
+3    * contributor license agreements.  See the NOTICE file distributed with
+4    * this work for additional information regarding copyright ownership.
+5    * The ASF licenses this file to You under the Apache License, Version 2.0
+6    * (the "License"); you may not use this file except in compliance with
+7    * the License.  You may obtain a copy of the License at
+8    *
+9    *      http://www.apache.org/licenses/LICENSE-2.0
+10   *
+11   * Unless required by applicable law or agreed to in writing, software
+12   * distributed under the License is distributed on an "AS IS" BASIS,
+13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+14   * See the License for the specific language governing permissions and
+15   * limitations under the License.
+16   */
+17  package org.apache.log4j.spi;
+18  
+19  import org.apache.log4j.ULogger;
+20  
+21  
+22  /***
+23   * A no operation (NOP) implementation of {@link ULogger}.
+24   *
+25   * @author Ceki G&uuml;lc&uuml;
+26   */
+27  public final class NOPULogger implements ULogger {
+28  
+29      /***
+30       * The unique instance of NOPLogger.
+31       */
+32      public static final NOPULogger NOP_LOGGER = new NOPULogger();
+33  
+34      /***
+35       * There is no point in people creating multiple instances of NullLogger.
+36       * Hence, the private access modifier.
+37       */
+38      private NOPULogger() {
+39          super();
+40      }
+41  
+42      /***
+43       * Get instance.
+44       * @param name logger name.
+45       * @return logger.
+46       */
+47      public static NOPULogger getLogger(final String name) {
+48          return NOP_LOGGER;
+49      }
+50  
+51      /***
+52       * {@inheritDoc}
+53       */
+54      public boolean isDebugEnabled() {
+55          return false;
+56      }
+57  
+58      /***
+59       * {@inheritDoc}
+60       */
+61      public void debug(final Object msg) {
+62          // NOP
+63      }
+64  
+65      /***
+66       * {@inheritDoc}
+67       */
+68      public void debug(final Object parameterizedMsg, final Object param1) {
+69          // NOP
+70      }
+71  
+72      /***
+73       * {@inheritDoc}
+74       */
+75      public void debug(final String parameterizedMsg,
+76                        final Object param1,
+77                        final Object param2) {
+78          // NOP
+79      }
+80  
+81      /***
+82       * {@inheritDoc}
+83       */
+84      public void debug(final Object msg, final Throwable t) {
+85          // NOP
+86      }
+87  
+88      /***
+89       * {@inheritDoc}
+90       */
+91      public boolean isInfoEnabled() {
+92          // NOP
+93          return false;
+94      }
+95  
+96      /***
+97       * {@inheritDoc}
+98       */
+99      public void info(final Object msg) {
+100         // NOP
+101     }
+102 
+103     /***
+104      * {@inheritDoc}
+105      */
+106     public void info(final Object parameterizedMsg, final Object param1) {
+107         // NOP
+108     }
+109 
+110     /***
+111      * {@inheritDoc}
+112      */
+113     public void info(final String parameterizedMsg,
+114                      final Object param1, final Object param2) {
+115         // NOP
+116     }
+117 
+118     /***
+119      * {@inheritDoc}
+120      */
+121     public void info(final Object msg, final Throwable t) {
+122         // NOP
+123     }
+124 
+125     /***
+126      * {@inheritDoc}
+127      */
+128     public boolean isWarnEnabled() {
+129         return false;
+130     }
+131 
+132     /***
+133      * {@inheritDoc}
+134      */
+135     public void warn(final Object msg) {
+136         // NOP
+137     }
+138 
+139     /***
+140      * {@inheritDoc}
+141      */
+142     public void warn(final Object parameterizedMsg,
+143                      final Object param1) {
+144         // NOP
+145     }
+146 
+147     /***
+148      * {@inheritDoc}
+149      */
+150     public void warn(final String parameterizedMsg,
+151                      final Object param1,
+152                      final Object param2) {
+153         // NOP
+154     }
+155 
+156     /***
+157      * {@inheritDoc}
+158      */
+159     public void warn(final Object msg, final Throwable t) {
+160         // NOP
+161     }
+162 
+163     /***
+164      * {@inheritDoc}
+165      */
+166     public boolean isErrorEnabled() {
+167         return false;
+168     }
+169 
+170     /***
+171      * {@inheritDoc}
+172      */
+173     public void error(final Object msg) {
+174         // NOP
+175     }
+176 
+177     /***
+178      * {@inheritDoc}
+179      */
+180     public void error(final Object parameterizedMsg, final Object param1) {
+181         // NOP
+182     }
+183 
+184     /***
+185      * {@inheritDoc}
+186      */
+187     public void error(final String parameterizedMsg,
+188                       final Object param1,
+189                       final Object param2) {
+190         // NOP
+191     }
+192 
+193     /***
+194      * {@inheritDoc}
+195      */
+196     public void error(final Object msg, final Throwable t) {
+197         // NOP
+198     }
+199 
+200 }
+
+
+ + Propchange: logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/spi/NOPULogger.html ------------------------------------------------------------------------------ svn:mime-type = text/html Added: logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/spi/SimpleULogger.html URL: http://svn.apache.org/viewvc/logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/spi/SimpleULogger.html?view=auto&rev=558355 ============================================================================== --- logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/spi/SimpleULogger.html (added) +++ logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/spi/SimpleULogger.html Sat Jul 21 10:20:56 2007 @@ -0,0 +1,318 @@ + + + +SimpleULogger xref + + + +
View Javadoc
+
+1   /*
+2    * Licensed to the Apache Software Foundation (ASF) under one or more
+3    * contributor license agreements.  See the NOTICE file distributed with
+4    * this work for additional information regarding copyright ownership.
+5    * The ASF licenses this file to You under the Apache License, Version 2.0
+6    * (the "License"); you may not use this file except in compliance with
+7    * the License.  You may obtain a copy of the License at
+8    *
+9    *      http://www.apache.org/licenses/LICENSE-2.0
+10   *
+11   * Unless required by applicable law or agreed to in writing, software
+12   * distributed under the License is distributed on an "AS IS" BASIS,
+13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+14   * See the License for the specific language governing permissions and
+15   * limitations under the License.
+16   */
+17  package org.apache.log4j.spi;
+18  
+19  import org.apache.log4j.ULogger;
+20  import org.apache.log4j.helpers.MessageFormatter;
+21  
+22  
+23  /***
+24   * A simple implementation that logs messages of level INFO or higher on
+25   * the console (<code>System.out</code>).
+26   * <p>
+27   * The output includes the relative time in milliseconds, thread name, level,
+28   * logger name, and the message followed by the line separator for the host.
+29   * In log4j terms it amounts to the "%r  [%t] %level %logger - %m%n" pattern.
+30   * <pre>
+31  176 [main] INFO examples.Sort - Populating an array of 2 elements in reverse.
+32  225 [main] INFO examples.SortAlgo - Entered the sort method.
+33  304 [main] INFO SortAlgo.DUMP - Dump of interger array:
+34  317 [main] INFO SortAlgo.DUMP - Element [0] = 0
+35  331 [main] INFO SortAlgo.DUMP - Element [1] = 1
+36  343 [main] INFO examples.Sort - The next log statement should be an error msg.
+37  346 [main] ERROR SortAlgo.DUMP - Tried to dump an uninitialized array.
+38          at org.log4j.examples.SortAlgo.dump(SortAlgo.java:58)
+39          at org.log4j.examples.Sort.main(Sort.java:64)
+40  467 [main] INFO  examples.Sort - Exiting main method.
+41  </pre>
+42   *
+43   * @author Ceki G&uuml;lc&uuml;
+44   */
+45  public final class SimpleULogger implements ULogger {
+46  
+47      /***
+48       * Logger name.
+49       */
+50    private final String loggerName;
+51  
+52  
+53    /***
+54     * Mark the time when this class gets loaded into memory.
+55     */
+56    private static long startTime = System.currentTimeMillis();
+57  
+58      /***
+59       * Line separator.
+60       */
+61    public static final String LINE_SEPARATOR
+62              = System.getProperty("line.separator");
+63  
+64      /***
+65       * INFO string literal.
+66       */
+67    private static final String INFO_STR = "INFO";
+68      /***
+69       * WARN string literal.
+70       */
+71    private static final String WARN_STR = "WARN";
+72      /***
+73       * ERROR string literal.
+74       */
+75    private static final String ERROR_STR = "ERROR";
+76  
+77    /***
+78     * Constructor is private to force construction through getLogger.
+79     * @param name logger name
+80     */
+81    private SimpleULogger(final String name) {
+82      super();
+83      this.loggerName = name;
+84    }
+85  
+86    /***
+87     * Creates a new instance.
+88     *
+89     * @param name logger name
+90     * @return  logger.
+91     */
+92    public static SimpleULogger getLogger(final String name) {
+93        return new SimpleULogger(name);
+94    }
+95  
+96    /***
+97     * {@inheritDoc}
+98     */
+99    public boolean isDebugEnabled() {
+100     return false;
+101   }
+102 
+103     /***
+104      * {@inheritDoc}
+105      */
+106   public void debug(final Object msg) {
+107     // NOP
+108   }
+109 
+110     /***
+111      * {@inheritDoc}
+112      */
+113   public void debug(final Object parameterizedMsg, final Object param1) {
+114     // NOP
+115   }
+116 
+117     /***
+118      * {@inheritDoc}
+119      */
+120   public void debug(final String parameterizedMsg,
+121                     final Object param1,
+122                     final Object param2) {
+123     // NOP
+124   }
+125 
+126     /***
+127      * {@inheritDoc}
+128      */
+129   public void debug(final Object msg, final Throwable t) {
+130     // NOP
+131   }
+132 
+133   /***
+134    * This is our internal implementation for logging regular (non-parameterized)
+135    * log messages.
+136    *
+137    * @param level level
+138    * @param message message
+139    * @param t throwable
+140    */
+141   private void log(final String level,
+142                    final String message,
+143                    final Throwable t) {
+144     StringBuffer buf = new StringBuffer();
+145 
+146     long millis  = System.currentTimeMillis();
+147     buf.append(millis - startTime);
+148 
+149     buf.append(" [");
+150     buf.append(Thread.currentThread().getName());
+151     buf.append("] ");
+152 
+153     buf.append(level);
+154     buf.append(" ");
+155 
+156     buf.append(loggerName);
+157     buf.append(" - ");
+158 
+159     buf.append(message);
+160 
+161     buf.append(LINE_SEPARATOR);
+162 
+163     System.out.print(buf.toString());
+164     if (t != null) {
+165       t.printStackTrace(System.out);
+166     }
+167     System.out.flush();
+168   }
+169   /***
+170    * For parameterized messages, first substitute parameters and then log.
+171    *
+172    * @param level level
+173    * @param parameterizedMsg message pattern
+174    * @param param1 param1
+175    * @param param2 param2
+176    */
+177   private void parameterizedLog(final String level,
+178                                 final Object parameterizedMsg,
+179                                 final Object param1,
+180                                 final Object param2) {
+181     if (parameterizedMsg instanceof String) {
+182       String msgStr = (String) parameterizedMsg;
+183       msgStr = MessageFormatter.format(msgStr, param1, param2);
+184       log(level, msgStr, null);
+185     } else {
+186       // To be failsafe, we handle the case where 'messagePattern' is not
+187       // a String. Unless the user makes a mistake, this should not happen.
+188       log(level, parameterizedMsg.toString(), null);
+189     }
+190   }
+191 
+192     /***
+193      * {@inheritDoc}
+194      */
+195   public boolean isInfoEnabled() {
+196     return true;
+197   }
+198 
+199     /***
+200      * {@inheritDoc}
+201      */
+202   public void info(final Object msg) {
+203     log(INFO_STR, msg.toString(), null);
+204   }
+205 
+206 
+207     /***
+208      * {@inheritDoc}
+209      */
+210   public void info(final Object parameterizedMsg, final Object param1) {
+211     parameterizedLog(INFO_STR, parameterizedMsg, param1, null);
+212   }
+213 
+214     /***
+215      * {@inheritDoc}
+216      */
+217   public void info(final String parameterizedMsg,
+218                    final Object param1,
+219                    final Object param2) {
+220     parameterizedLog(INFO_STR, parameterizedMsg, param1, param2);
+221   }
+222 
+223     /***
+224      * {@inheritDoc}
+225      */
+226   public void info(final Object msg, final Throwable t) {
+227     log(INFO_STR, msg.toString(), t);
+228   }
+229 
+230     /***
+231      * {@inheritDoc}
+232      */
+233   public boolean isWarnEnabled() {
+234     return true;
+235   }
+236 
+237     /***
+238      * {@inheritDoc}
+239      */
+240   public void warn(final Object msg) {
+241     log(WARN_STR, msg.toString(), null);
+242   }
+243 
+244     /***
+245      * {@inheritDoc}
+246      */
+247   public void warn(final Object parameterizedMsg, final Object param1) {
+248     parameterizedLog(WARN_STR, parameterizedMsg, param1, null);
+249   }
+250 
+251     /***
+252      * {@inheritDoc}
+253      */
+254   public void warn(final String parameterizedMsg,
+255                    final Object param1,
+256                    final Object param2) {
+257     parameterizedLog(WARN_STR, parameterizedMsg, param1, param2);
+258   }
+259 
+260     /***
+261      * {@inheritDoc}
+262      */
+263   public void warn(final Object msg, final Throwable t) {
+264     log(WARN_STR, msg.toString(), t);
+265   }
+266 
+267     /***
+268      * {@inheritDoc}
+269      */
+270   public boolean isErrorEnabled() {
+271     return true;
+272   }
+273 
+274     /***
+275      * {@inheritDoc}
+276      */
+277   public void error(final Object msg) {
+278     log(ERROR_STR, msg.toString(), null);
+279   }
+280 
+281 
+282     /***
+283      * {@inheritDoc}
+284      */
+285   public void error(final Object parameterizedMsg, final Object param1) {
+286     parameterizedLog(ERROR_STR, parameterizedMsg, param1, null);
+287   }
+288 
+289     /***
+290      * {@inheritDoc}
+291      */
+292   public void error(final String parameterizedMsg,
+293                     final Object param1,
+294                     final Object param2) {
+295     parameterizedLog(ERROR_STR, parameterizedMsg, param1, param2);
+296   }
+297 
+298     /***
+299      * {@inheritDoc}
+300      */
+301   public void error(final Object msg, final Throwable t) {
+302     log(ERROR_STR, msg.toString(), t);
+303   }
+304 
+305 }
+
+
+ + Propchange: logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/spi/SimpleULogger.html ------------------------------------------------------------------------------ svn:mime-type = text/html Added: logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/spi/Thresholdable.html URL: http://svn.apache.org/viewvc/logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/spi/Thresholdable.html?view=auto&rev=558355 ============================================================================== --- logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/spi/Thresholdable.html (added) +++ logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/spi/Thresholdable.html Sat Jul 21 10:20:56 2007 @@ -0,0 +1,72 @@ + + + +Thresholdable xref + + + +
View Javadoc
+
+1   /*
+2    * Licensed to the Apache Software Foundation (ASF) under one or more
+3    * contributor license agreements.  See the NOTICE file distributed with
+4    * this work for additional information regarding copyright ownership.
+5    * The ASF licenses this file to You under the Apache License, Version 2.0
+6    * (the "License"); you may not use this file except in compliance with
+7    * the License.  You may obtain a copy of the License at
+8    *
+9    *      http://www.apache.org/licenses/LICENSE-2.0
+10   *
+11   * Unless required by applicable law or agreed to in writing, software
+12   * distributed under the License is distributed on an "AS IS" BASIS,
+13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+14   * See the License for the specific language governing permissions and
+15   * limitations under the License.
+16   */
+17  
+18  package org.apache.log4j.spi;
+19  
+20  import org.apache.log4j.Level;
+21  
+22  /***
+23   * An interface that defines the required methods for supporting the
+24   * setting and getting of a level threshold.  Components should implement
+25   * this interface if logging events they process should meet a certain
+26   * threshold before being processed further.  Examples of this are
+27   * Appenders and Receivers which will not process logging events unless
+28   * the event level is at or greater than a set threshold level.
+29   *
+30   * @author Paul Smith (psmith@apache.org)
+31   * @author Mark Womack
+32   * @since 1.3
+33   */
+34  public interface Thresholdable {
+35      /***
+36       * Sets the component theshold to the given level.
+37       *
+38       * @param level The threshold level events must equal or be greater
+39       *              than before further processing can be done.
+40       */
+41      void setThreshold(Level level);
+42  
+43      /***
+44       * Gets the current threshold setting of the component.
+45       *
+46       * @return Level The current threshold level of the component.
+47       */
+48      Level getThreshold();
+49  
+50      /***
+51       * Returns true if the given level is equals or greater than the current
+52       * threshold value of the component.
+53       *
+54       * @param level The level to test against the component threshold.
+55       * @return boolean True if level is equal or greater than the
+56       *         component threshold.
+57       */
+58      boolean isAsSevereAsThreshold(Level level);
+59  }
+
+
+ + Propchange: logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/spi/Thresholdable.html ------------------------------------------------------------------------------ svn:mime-type = text/html Added: logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/spi/package-frame.html URL: http://svn.apache.org/viewvc/logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/spi/package-frame.html?view=auto&rev=558355 ============================================================================== --- logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/spi/package-frame.html (added) +++ logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/spi/package-frame.html Sat Jul 21 10:20:56 2007 @@ -0,0 +1,51 @@ + + + + + + Apache Component Companion for log4j 1.2. 1.0-SNAPSHOT Reference Package org.apache.log4j.spi + + + + +

+ org.apache.log4j.spi +

+ +

Classes

+ + + + + \ No newline at end of file Propchange: logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/spi/package-frame.html ------------------------------------------------------------------------------ svn:mime-type = text/html Added: logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/spi/package-summary.html URL: http://svn.apache.org/viewvc/logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/spi/package-summary.html?view=auto&rev=558355 ============================================================================== --- logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/spi/package-summary.html (added) +++ logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/spi/package-summary.html Sat Jul 21 10:20:56 2007 @@ -0,0 +1,112 @@ + + + + + + Apache Component Companion for log4j 1.2. 1.0-SNAPSHOT Reference Package $name + + + +
+ +
+
+ +
+ +

Package org.apache.log4j.spi

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Class Summary
+ Component +
+ ComponentBase +
+ ErrorItem +
+ Log4JULogger +
+ LoggerEventListener +
+ LoggerRepositoryEventListener +
+ LoggerRepositoryEx +
+ NOPULogger +
+ SimpleULogger +
+ Thresholdable +
+ +
+ +
+
+ +
+
+ Copyright © null Apache Software Foundation. All Rights Reserved. + + \ No newline at end of file Propchange: logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/spi/package-summary.html ------------------------------------------------------------------------------ svn:mime-type = text/html Added: logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/xml/UnrecognizedElementHandler.html URL: http://svn.apache.org/viewvc/logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/xml/UnrecognizedElementHandler.html?view=auto&rev=558355 ============================================================================== --- logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/xml/UnrecognizedElementHandler.html (added) +++ logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/xml/UnrecognizedElementHandler.html Sat Jul 21 10:20:56 2007 @@ -0,0 +1,55 @@ + + + +UnrecognizedElementHandler xref + + + +
View Javadoc
+
+1   /*
+2    * Licensed to the Apache Software Foundation (ASF) under one or more
+3    * contributor license agreements.  See the NOTICE file distributed with
+4    * this work for additional information regarding copyright ownership.
+5    * The ASF licenses this file to You under the Apache License, Version 2.0
+6    * (the "License"); you may not use this file except in compliance with
+7    * the License.  You may obtain a copy of the License at
+8    *
+9    *      http://www.apache.org/licenses/LICENSE-2.0
+10   *
+11   * Unless required by applicable law or agreed to in writing, software
+12   * distributed under the License is distributed on an "AS IS" BASIS,
+13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+14   * See the License for the specific language governing permissions and
+15   * limitations under the License.
+16   */
+17  package org.apache.log4j.xml;
+18  
+19  import org.w3c.dom.Element;
+20  import java.util.Properties;
+21  
+22  /***
+23   * When implemented by an object configured by DOMConfigurator,
+24   * the handle method will be called when an unrecognized child
+25   * element is encountered.  Unrecognized child elements of
+26   * the log4j:configuration element will be dispatched to
+27   * the logger repository if it supports this interface.
+28   *
+29   * @since 1.2.15
+30   */
+31  public interface UnrecognizedElementHandler {
+32      /***
+33       * Called to inform a configured object when
+34       * an unrecognized child element is encountered.
+35       * @param element element, may not be null.
+36       * @param props properties in force, may be null.
+37       * @return true if configured object recognized the element
+38       * @throws Exception throw an exception to prevent activation
+39       * of the configured object.
+40       */
+41      boolean parseUnrecognizedElement(Element element, Properties props) throws Exception;
+42  }
+
+
+ + Propchange: logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/xml/UnrecognizedElementHandler.html ------------------------------------------------------------------------------ svn:mime-type = text/html Added: logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/xml/package-frame.html URL: http://svn.apache.org/viewvc/logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/xml/package-frame.html?view=auto&rev=558355 ============================================================================== --- logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/xml/package-frame.html (added) +++ logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/xml/package-frame.html Sat Jul 21 10:20:56 2007 @@ -0,0 +1,24 @@ + + + + + + Apache Component Companion for log4j 1.2. 1.0-SNAPSHOT Reference Package org.apache.log4j.xml + + + + +

+ org.apache.log4j.xml +

+ +

Classes

+ + + + + \ No newline at end of file Propchange: logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/xml/package-frame.html ------------------------------------------------------------------------------ svn:mime-type = text/html Added: logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/xml/package-summary.html URL: http://svn.apache.org/viewvc/logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/xml/package-summary.html?view=auto&rev=558355 ============================================================================== --- logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/xml/package-summary.html (added) +++ logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/xml/package-summary.html Sat Jul 21 10:20:56 2007 @@ -0,0 +1,67 @@ + + + + + + Apache Component Companion for log4j 1.2. 1.0-SNAPSHOT Reference Package $name + + + +
+ +
+
+ +
+ +

Package org.apache.log4j.xml

+ + + + + + + + + + + + +
Class Summary
+ UnrecognizedElementHandler +
+ +
+ +
+
+ +
+
+ Copyright © null Apache Software Foundation. All Rights Reserved. + + \ No newline at end of file Propchange: logging/site/trunk/docs/log4j/companions/component/xref/org/apache/log4j/xml/package-summary.html ------------------------------------------------------------------------------ svn:mime-type = text/html