@DeprecatedSE public class Log4jNestedDiagnosticContextInterceptor extends ObjectSE implements AsyncWebRequestInterceptor
NDC.push(String), NDC.pop()| 修飾子と型 | フィールドと説明 |
|---|---|
protected Logger | log4jLogger 使用すべきではありません。 サブクラスで利用可能なロガー |
| コンストラクターと説明 |
|---|
Log4jNestedDiagnosticContextInterceptor() 使用すべきではありません。 |
| 修飾子と型 | メソッドと説明 |
|---|---|
void | afterCompletion(WebRequest request, ExceptionSE ex) 使用すべきではありません。 リクエストが処理された後、Log4J NDC からログメッセージを削除します。 |
void | afterConcurrentHandlingStarted(WebRequest request) 使用すべきではありません。 非同期リクエスト処理の開始後に処理スレッドが終了したときに、Log4J NDC からログメッセージを削除します。 |
protected StringSE | getNestedDiagnosticContextMessage(WebRequest request) 使用すべきではありません。 Log4J ネストされた診断コンテキストにプッシュするメッセージを決定します。 |
protected boolean | isIncludeClientInfo() 使用すべきではありません。 セッション ID とユーザー名をログメッセージに含めるかどうかを返します。 |
void | postHandle(WebRequest request, ModelMap model) 使用すべきではありません。 呼び出しが成功した後、ビューのレンダリングの前に(もしあれば)リクエストハンドラーの実行をインターセプトします。 |
void | preHandle(WebRequest request) 使用すべきではありません。 リクエストが処理される前に、Log4J NDC にメッセージを追加します。 |
void | setIncludeClientInfo(boolean includeClientInfo) 使用すべきではありません。 セッション ID とユーザー名をログメッセージに含めるかどうかを設定します。 |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSEprotected final Logger log4jLogger
public Log4jNestedDiagnosticContextInterceptor()
public void setIncludeClientInfo(boolean includeClientInfo)
protected boolean isIncludeClientInfo()
public void preHandle(WebRequest request) throws ExceptionSE
WebRequestInterceptor の preHandle request - 現在の Web リクエスト ExceptionSE - エラーの場合 protected StringSE getNestedDiagnosticContextMessage(WebRequest request)
デフォルトは、リクエストオブジェクトの getDescription 結果です。
request - 現在の HTTP リクエスト WebRequest.getDescription(boolean), isIncludeClientInfo()public void postHandle(WebRequest request, ModelMap model) throws ExceptionSE
WebRequestInterceptorハンドラーの実行が成功した後にコンテキストリソースを変更することができます(たとえば、Hibernate セッションのフラッシュ)。
WebRequestInterceptor の postHandle request - 現在の Web リクエスト model - ビューに公開されるモデルオブジェクトのマップ(null の場合があります)。必要に応じて、公開されたモデルの分析やモデル属性の追加に使用できます。ExceptionSE - エラーの場合 public void afterCompletion(WebRequest request, ExceptionSE ex) throws ExceptionSE
WebRequestInterceptor の afterCompletion request - 現在の Web リクエスト ex - ハンドラーの実行時にスローされる例外(ある場合)ExceptionSE - エラーの場合 public void afterConcurrentHandlingStarted(WebRequest request)
AsyncWebRequestInterceptor の afterConcurrentHandlingStarted request - 現在のリクエスト