クラス AmqpAppender
java.lang.ObjectSE
org.apache.logging.log4j.core.AbstractLifeCycle
org.apache.logging.log4j.core.filter.AbstractFilterable
org.apache.logging.log4j.core.appender.AbstractAppender
org.springframework.amqp.rabbit.log4j2.AmqpAppender
- 実装されているすべてのインターフェース:
org.apache.logging.log4j.core.Appender、org.apache.logging.log4j.core.filter.Filterable、org.apache.logging.log4j.core.impl.LocationAware、org.apache.logging.log4j.core.LifeCycle、org.apache.logging.log4j.core.LifeCycle2
@Plugin(name="RabbitMQ",
category="Core",
elementType="appender",
printObject=true)
public class AmqpAppender
extends org.apache.logging.log4j.core.appender.AbstractAppender
ロギングイベントを AMQP Exchange に発行する Log4j 2 アペンダー。
- 導入:
- 1.6
- 作成者:
- Gary Russell, Stephen Oakey, Artem Bilan, Dominique Villard, Nicolas Ristock, Eugene Gusev, Francesco Scipioni, Stephane Nicoll
ネストされたクラスの要約
ネストされたクラス修飾子と型クラス説明static classアペンダーのマネージャークラス。static classstatic classLoggingEvent、その MDC プロパティ、および再試行回数をカプセル化するヘルパークラス。protected class実際に LoggingEvents を非同期で送信するためのヘルパークラス。インターフェース org.apache.logging.log4j.core.LifeCycle から継承されたネストクラス / インターフェース
org.apache.logging.log4j.core.LifeCycle.Stateフィールドのサマリー
フィールド修飾子と型フィールド説明static final StringSEメッセージプロパティ内のアプリケーション ID のキー名 (appender 構成で設定されている場合)。static final StringSEメッセージプロパティのロガーレベル名のキー名。static final StringSEメッセージプロパティのロガーカテゴリ名のキー名。static final StringSEメッセージプロパティのスレッド名のキー名。クラス org.apache.logging.log4j.core.AbstractLifeCycle から継承されたフィールド
DEFAULT_STOP_TIMEOUT, DEFAULT_STOP_TIMEUNIT, LOGGERインターフェース org.apache.logging.log4j.core.Appender から継承されたフィールド
ELEMENT_TYPE, EMPTY_ARRAYコンストラクターの概要
コンストラクターコンストラクター説明AmqpAppender(StringSE name, @Nullable org.apache.logging.log4j.core.Filter filter, org.apache.logging.log4j.core.Layout<? extends SerializableSE> layout, boolean ignoreExceptions, org.apache.logging.log4j.core.config.Property[] properties, AmqpAppender.AmqpManager manager, BlockingQueueSE<AmqpAppender.Event> eventQueue) 提供されたプロパティを使用してインスタンスを構築します。メソッドのサマリー
修飾子と型メソッド説明voidappend(org.apache.logging.log4j.core.LogEvent event) protected voiddoSend(AmqpAppender.Event event, org.apache.logging.log4j.core.LogEvent logEvent, MessageProperties amqpProps) int送信待ちのイベント数を返します。static AmqpAppender.Builder新しいビルダーを作成します。protected MessagepostProcessMessageBeforeSend(Message message, AmqpAppender.Event event) サブクラスは、送信前に最終メッセージを変更できます。protected voidsendEvent(AmqpAppender.Event event, MapSE<?, ?> properties) protected booleanstop(long timeout, TimeUnitSE timeUnit, boolean changeLifeCycleState) クラス org.apache.logging.log4j.core.appender.AbstractAppender から継承されたメソッド
error, error, error, getHandler, getLayout, getName, ignoreExceptions, parseInt, requiresLocation, setHandler, toSerializable, toStringクラス org.apache.logging.log4j.core.filter.AbstractFilterable から継承されたメソッド
addFilter, getFilter, getPropertyArray, hasFilter, isFiltered, removeFilter, start, stopクラス org.apache.logging.log4j.core.AbstractLifeCycle から継承されたメソッド
equalsImpl, getState, getStatusLogger, hashCodeImpl, initialize, isInitialized, isStarted, isStarting, isStopped, isStopping, setStarted, setStarting, setState, setStopped, setStopping, stop, stopクラス java.lang.ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, wait, waitSE, waitSEインターフェース org.apache.logging.log4j.core.LifeCycle から継承されたメソッド
getState, initialize, isStarted, isStopped, start, stop
フィールドの詳細
APPLICATION_ID
メッセージプロパティ内のアプリケーション ID のキー名 (appender 構成で設定されている場合)。- 関連事項:
CATEGORY_NAME
CATEGORY_LEVEL
THREAD_NAME
コンストラクターの詳細
AmqpAppender
public AmqpAppender(StringSE name, @Nullable org.apache.logging.log4j.core.Filter filter, org.apache.logging.log4j.core.Layout<? extends SerializableSE> layout, boolean ignoreExceptions, org.apache.logging.log4j.core.config.Property[] properties, AmqpAppender.AmqpManager manager, BlockingQueueSE<AmqpAppender.Event> eventQueue) 提供されたプロパティを使用してインスタンスを構築します。- パラメーター:
name- 名前。filter- フィルター。layout- レイアウト。ignoreExceptions- 例外を無視する場合は true。properties- プロパティ。manager- マネージャー。eventQueue- イベントキュー。
メソッドの詳細
newBuilder
append
public void append(org.apache.logging.log4j.core.LogEvent event) postProcessMessageBeforeSend
サブクラスは、送信前に最終メッセージを変更できます。- パラメーター:
message- メッセージ。event- 行事。- 戻り値:
- 変更されたメッセージ。
sendEvent
doSend
protected void doSend(AmqpAppender.Event event, org.apache.logging.log4j.core.LogEvent logEvent, MessageProperties amqpProps) stop
- オーバーライド:
- クラス
org.apache.logging.log4j.core.filter.AbstractFilterableのstop
getQueuedEventCount
public int getQueuedEventCount()送信待ちのイベント数を返します。- 戻り値:
- 送信待ちのイベント数。