| | |
| | | package org.opends.server.loggers; |
| | | import org.opends.messages.Message; |
| | | |
| | | |
| | | |
| | | import java.util.concurrent.CopyOnWriteArrayList; |
| | | import java.util.List; |
| | | import java.util.ArrayList; |
| | |
| | | // The singleton instance of this class for configuration purposes. |
| | | private static final ErrorLogger instance = new ErrorLogger(); |
| | | |
| | | static |
| | | { |
| | | // Add the default publisher to stdout. |
| | | addErrorLogPublisher( |
| | | TextErrorLogPublisher.getStartupTextErrorPublisher( |
| | | new TextWriter.STDOUT())); |
| | | } |
| | | |
| | | /** |
| | | * Retrieve the singleton instance of this class. |
| | | * |
| | |
| | | } |
| | | |
| | | /** |
| | | * Removes first error log publisher from the logger. |
| | | */ |
| | | public synchronized static void removeFirstErrorLogPublisher() |
| | | { |
| | | if(!errorPublishers.isEmpty()) |
| | | { |
| | | ErrorLogPublisher publisher = errorPublishers.remove(0); |
| | | |
| | | publisher.close(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * Initializes all the error log publishers. |
| | | * |
| | | * @param configs The error log publisher configurations. |