org.apache.log4j.helpers.AppenderAttachableImpl Java Examples
The following examples show how to use
org.apache.log4j.helpers.AppenderAttachableImpl.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AsyncAppender.java From cacheonix-core with GNU Lesser General Public License v2.1 | 6 votes |
/** * Create new instance. */ public AsyncAppender() { appenders = new AppenderAttachableImpl(); // // only set for compatibility aai = appenders; dispatcher = new Thread(new Dispatcher(this, buffer, discardMap, appenders)); // It is the user's responsibility to close appenders before // exiting. dispatcher.setDaemon(true); // set the dispatcher priority to lowest possible value // dispatcher.setPriority(Thread.MIN_PRIORITY); dispatcher.setName("Dispatcher-" + dispatcher.getName()); dispatcher.start(); }
Example #2
Source File: AsyncAppender.java From cacheonix-core with GNU Lesser General Public License v2.1 | 5 votes |
/** * Create new instance of dispatcher. * * @param parent parent AsyncAppender, may not be null. * @param buffer event buffer, may not be null. * @param discardMap discard map, may not be null. * @param appenders appenders, may not be null. */ public Dispatcher( final AsyncAppender parent, final List buffer, final Map discardMap, final AppenderAttachableImpl appenders) { this.parent = parent; this.buffer = buffer; this.appenders = appenders; this.discardMap = discardMap; }
Example #3
Source File: GraphingStatisticsAppender.java From freehealth-connector with GNU Affero General Public License v3.0 | 5 votes |
public void flush() { AppenderAttachableImpl var1 = this.downstreamAppenders; synchronized(this.downstreamAppenders) { if (this.hasUnflushedData && this.downstreamAppenders.getAllAppenders() != null) { this.downstreamAppenders.appendLoopOnAppenders(new LoggingEvent(Logger.class.getName(), Logger.getLogger("org.perf4j.TimingLogger"), System.currentTimeMillis(), this.lastAppendedEventLevel, this.chartGenerator.getChartUrl(), (Throwable)null)); this.hasUnflushedData = false; } } }
Example #4
Source File: GraphingStatisticsAppender.java From freehealth-connector with GNU Affero General Public License v3.0 | 5 votes |
public void close() { AppenderAttachableImpl var1 = this.downstreamAppenders; synchronized(this.downstreamAppenders) { this.flush(); Enumeration enumer = this.downstreamAppenders.getAllAppenders(); while(enumer != null && enumer.hasMoreElements()) { Appender appender = (Appender)enumer.nextElement(); appender.close(); } } }
Example #5
Source File: AsyncCoalescingStatisticsAppender.java From freehealth-connector with GNU Affero General Public License v3.0 | 5 votes |
public void close() { this.baseImplementation.stop(); AppenderAttachableImpl var1 = this.downstreamAppenders; synchronized(this.downstreamAppenders) { Enumeration enumer = this.downstreamAppenders.getAllAppenders(); while(enumer != null && enumer.hasMoreElements()) { Appender appender = (Appender)enumer.nextElement(); if (appender instanceof Flushable) { try { ((Flushable)appender).flush(); } catch (Exception var6) { ; } } } enumer = this.downstreamAppenders.getAllAppenders(); while(true) { if (enumer == null || !enumer.hasMoreElements()) { break; } ((Appender)enumer.nextElement()).close(); } } this.closed = true; }
Example #6
Source File: GraphingStatisticsAppender.java From freehealth-connector with GNU Affero General Public License v3.0 | 5 votes |
public GraphingStatisticsAppender() { this.graphType = StatsValueRetriever.MEAN_VALUE_RETRIEVER.getValueName(); this.tagNamesToGraph = null; this.dataPointsPerGraph = 20; this.numLoggedStatistics = new AtomicLong(); this.hasUnflushedData = false; this.lastAppendedEventLevel = Level.INFO; this.downstreamAppenders = new AppenderAttachableImpl(); }
Example #7
Source File: GraphingStatisticsAppender.java From freehealth-connector with GNU Affero General Public License v3.0 | 4 votes |
public void addAppender(Appender appender) { AppenderAttachableImpl var2 = this.downstreamAppenders; synchronized(this.downstreamAppenders) { this.downstreamAppenders.addAppender(appender); } }
Example #8
Source File: GraphingStatisticsAppender.java From freehealth-connector with GNU Affero General Public License v3.0 | 4 votes |
public void removeAppender(String name) { AppenderAttachableImpl var2 = this.downstreamAppenders; synchronized(this.downstreamAppenders) { this.downstreamAppenders.removeAppender(name); } }
Example #9
Source File: GraphingStatisticsAppender.java From freehealth-connector with GNU Affero General Public License v3.0 | 4 votes |
public void removeAppender(Appender appender) { AppenderAttachableImpl var2 = this.downstreamAppenders; synchronized(this.downstreamAppenders) { this.downstreamAppenders.removeAppender(appender); } }
Example #10
Source File: GraphingStatisticsAppender.java From freehealth-connector with GNU Affero General Public License v3.0 | 4 votes |
public void removeAllAppenders() { AppenderAttachableImpl var1 = this.downstreamAppenders; synchronized(this.downstreamAppenders) { this.downstreamAppenders.removeAllAppenders(); } }
Example #11
Source File: GraphingStatisticsAppender.java From freehealth-connector with GNU Affero General Public License v3.0 | 4 votes |
public boolean isAttached(Appender appender) { AppenderAttachableImpl var2 = this.downstreamAppenders; synchronized(this.downstreamAppenders) { return this.downstreamAppenders.isAttached(appender); } }
Example #12
Source File: GraphingStatisticsAppender.java From freehealth-connector with GNU Affero General Public License v3.0 | 4 votes |
public Appender getAppender(String name) { AppenderAttachableImpl var2 = this.downstreamAppenders; synchronized(this.downstreamAppenders) { return this.downstreamAppenders.getAppender(name); } }
Example #13
Source File: GraphingStatisticsAppender.java From freehealth-connector with GNU Affero General Public License v3.0 | 4 votes |
public Enumeration getAllAppenders() { AppenderAttachableImpl var1 = this.downstreamAppenders; synchronized(this.downstreamAppenders) { return this.downstreamAppenders.getAllAppenders(); } }
Example #14
Source File: AsyncCoalescingStatisticsAppender.java From freehealth-connector with GNU Affero General Public License v3.0 | 4 votes |
public AsyncCoalescingStatisticsAppender() { this.downstreamLogLevel = Level.INFO; this.baseImplementation = this.newGenericAsyncCoalescingStatisticsAppender(); this.downstreamAppenders = new AppenderAttachableImpl(); this.shutdownHook = null; }
Example #15
Source File: AsyncCoalescingStatisticsAppender.java From freehealth-connector with GNU Affero General Public License v3.0 | 4 votes |
public void removeAppender(String name) { AppenderAttachableImpl var2 = this.downstreamAppenders; synchronized(this.downstreamAppenders) { this.downstreamAppenders.removeAppender(name); } }
Example #16
Source File: AsyncCoalescingStatisticsAppender.java From freehealth-connector with GNU Affero General Public License v3.0 | 4 votes |
public void removeAppender(Appender appender) { AppenderAttachableImpl var2 = this.downstreamAppenders; synchronized(this.downstreamAppenders) { this.downstreamAppenders.removeAppender(appender); } }
Example #17
Source File: AsyncCoalescingStatisticsAppender.java From freehealth-connector with GNU Affero General Public License v3.0 | 4 votes |
public void removeAllAppenders() { AppenderAttachableImpl var1 = this.downstreamAppenders; synchronized(this.downstreamAppenders) { this.downstreamAppenders.removeAllAppenders(); } }
Example #18
Source File: AsyncCoalescingStatisticsAppender.java From freehealth-connector with GNU Affero General Public License v3.0 | 4 votes |
public boolean isAttached(Appender appender) { AppenderAttachableImpl var2 = this.downstreamAppenders; synchronized(this.downstreamAppenders) { return this.downstreamAppenders.isAttached(appender); } }
Example #19
Source File: AsyncCoalescingStatisticsAppender.java From freehealth-connector with GNU Affero General Public License v3.0 | 4 votes |
public Appender getAppender(String name) { AppenderAttachableImpl var2 = this.downstreamAppenders; synchronized(this.downstreamAppenders) { return this.downstreamAppenders.getAppender(name); } }
Example #20
Source File: AsyncCoalescingStatisticsAppender.java From freehealth-connector with GNU Affero General Public License v3.0 | 4 votes |
public Enumeration getAllAppenders() { AppenderAttachableImpl var1 = this.downstreamAppenders; synchronized(this.downstreamAppenders) { return this.downstreamAppenders.getAllAppenders(); } }
Example #21
Source File: AsyncCoalescingStatisticsAppender.java From freehealth-connector with GNU Affero General Public License v3.0 | 4 votes |
public void addAppender(Appender appender) { AppenderAttachableImpl var2 = this.downstreamAppenders; synchronized(this.downstreamAppenders) { this.downstreamAppenders.addAppender(appender); } }