クラス 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
ネストされたクラスの概要
ネストされたクラス 修飾子と型 クラス 説明 protected static classAmqpAppender.AmqpManagerアペンダーのマネージャークラス。protected static classAmqpAppender.Builderprotected static classAmqpAppender.EventLoggingEvent、その MDC プロパティ、および再試行回数をカプセル化するヘルパークラス。protected classAmqpAppender.EventSender実際に LoggingEvents を非同期で送信するためのヘルパークラス。
フィールド概要
フィールド 修飾子と型 フィールド 説明 static StringSEAPPLICATION_IDメッセージプロパティ内のアプリケーション ID のキー名 (appender 構成で設定されている場合)。static StringSECATEGORY_LEVELメッセージプロパティのロガーレベル名のキー名。static StringSECATEGORY_NAMEメッセージプロパティのロガーカテゴリ名のキー名。static StringSETHREAD_NAMEメッセージプロパティのスレッド名のキー名。
コンストラクター概要
コンストラクター コンストラクター 説明 AmqpAppender(StringSE name, 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)intgetQueuedEventCount()送信待ちのイベント数を返します。static AmqpAppender.BuildernewBuilder()新しいビルダーを作成します。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
コンストラクターの詳細
AmqpAppender
public AmqpAppender(StringSE name, 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。manager- マネージャー。eventQueue- イベントキュー。properties- プロパティ。
メソッドの詳細
newBuilder
@PluginBuilderFactory public static AmqpAppender.Builder newBuilder()
新しいビルダーを作成します。- 戻り値:
- ビルダー。
append
public void append(org.apache.logging.log4j.core.LogEvent event)
postProcessMessageBeforeSend
protected Message postProcessMessageBeforeSend(Message message, AmqpAppender.Event event)
サブクラスは、送信前に最終メッセージを変更できます。- パラメーター:
message- メッセージ。event- 行事。- 戻り値:
- 変更されたメッセージ。
sendEvent
protected void sendEvent(AmqpAppender.Event event, MapSE<?,?> properties)
doSend
protected void doSend(AmqpAppender.Event event, org.apache.logging.log4j.core.LogEvent logEvent, MessageProperties amqpProps)
stop
protected boolean stop(long timeout, TimeUnitSE timeUnit, boolean changeLifeCycleState)- オーバーライド:
- クラス
org.apache.logging.log4j.core.filter.AbstractFilterableのstop
getQueuedEventCount
public int getQueuedEventCount()
送信待ちのイベント数を返します。- 戻り値:
- 送信待ちのイベント数。