| | |
| | | * Trace methods will use this static boolean to determine if debug is enabled |
| | | * so to not incur the cost of calling debugPublishers.isEmpty(). |
| | | */ |
| | | static boolean enabled; |
| | | private static boolean enabled; |
| | | |
| | | private static final LoggerStorage |
| | | <DebugLogPublisher<DebugLogPublisherCfg>, DebugLogPublisherCfg> |
| | |
| | | return targets; |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final synchronized void addLogPublisher( |
| | | DebugLogPublisher<DebugLogPublisherCfg> publisher) |
| | | public final synchronized void addLogPublisher(final DebugLogPublisher<DebugLogPublisherCfg> publisher) |
| | | { |
| | | loggerStorage.addLogPublisher(publisher); |
| | | updateTracerSettings(); |
| | | enabled = true; |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final synchronized boolean removeLogPublisher( |
| | | DebugLogPublisher<DebugLogPublisherCfg> publisher) |
| | | public final synchronized boolean removeLogPublisher(final DebugLogPublisher<DebugLogPublisherCfg> publisher) |
| | | { |
| | | boolean removed = loggerStorage.removeLogPublisher(publisher); |
| | | updateTracerSettings(); |
| | |
| | | return removed; |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public final synchronized void removeAllLogPublishers() |
| | | { |