| | |
| | | public class ConsoleDebugLogPublisher extends |
| | | DebugLogPublisher<DebugLogPublisherCfg> |
| | | { |
| | | /** |
| | | * The print stream where tracing will be sent. |
| | | */ |
| | | /** The print stream where tracing will be sent. */ |
| | | private PrintStream err; |
| | | |
| | | /** |
| | | * The format used for trace timestamps. |
| | | */ |
| | | /** The format used for trace timestamps. */ |
| | | private DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss.SSS"); |
| | | |
| | | /** |
| | |
| | | this.err = err; |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void initializeLogPublisher(DebugLogPublisherCfg config, ServerContext serverContext) |
| | | throws ConfigException, InitializationException { |
| | | // This publisher is not configurable. |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void trace(TraceSettings settings, |
| | | String signature, |
| | |
| | | publish(msg, stack); |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void traceException(TraceSettings settings, |
| | | String signature, |
| | |
| | | publish(message, stack); |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void close() |
| | | { |
| | |
| | | err.print(buf); |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public DN getDN() |
| | | { |