Class AppenderUtils

java.lang.Object
de.edgesoft.edgeutils.log4j.AppenderUtils

public abstract class AppenderUtils
extends java.lang.Object
Log4j Appender utilities.

Legal stuff

Copyright 2010-2020 Ekkart Kleinod ekleinod@edgesoft.de

This file is part of edgeutils.

edgeutils is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

edgeutils is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with edgeutils. If not, see http://www.gnu.org/licenses/.

Since:
0.13.0
Author:
Ekkart Kleinod
  • Constructor Summary

    Constructors 
    Constructor Description
    AppenderUtils()  
  • Method Summary

    Modifier and Type Method Description
    static java.io.Writer startWriterAppender​(java.lang.String theAppenderName)
    Adds and starts writer appender.
    static void stopAppender​(java.lang.String theAppenderName)
    Stops and removes appender.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • startWriterAppender

      public static java.io.Writer startWriterAppender​(java.lang.String theAppenderName)
      Adds and starts writer appender.
      Parameters:
      theAppenderName - name of appender
      Returns:
      writer
    • stopAppender

      public static void stopAppender​(java.lang.String theAppenderName)
      Stops and removes appender. I hope, the Writer is closed when the appender is stopped but I am not sure. I would close the writer here but I cannot find a method to return the Writer from a WriterAppenderor its WriterManager
      Parameters:
      theAppenderName - name of appender