The Logger Component


[Introduction] [Common Attributes] [Standard Implementation Attributes]

Introduction

はじめに

A Logger component represents a mechanism by which event, error, and debugging information from a Catalina component, or group of such components, can be directed to a common destination. Each Logger is associated with a Container, by being nested inside the corresponding <Engine>, <Host>, or <Context> element for that Container.

Loggerコンポーネントは、イベント、エラーとそのようなコンポーネントのCatalinaコンポーネントまたはグループからのデバッグ情報が共通の宛先に向けることができる仕組みを表します。 各Loggerは、ネストされて、Containerと関連されます対応する< Engine> < Host> )または< Context> 要素。

If you attach a Logger to an outer Container (such as an Engine, that logger will be used for all nested Containers (Host and Context components), unless you specifically nest a different logger inside the nested Container.

あなたがLoggerを外のコンテナに付ける、(Engineのような、あなたが特にネストしていない限り、そのloggerが全てのネストされていたコンテナ(HostContextコンポーネント)のために使われることになることネストされていたコンテナの中に異なるlogger。


Common Attributes

共通属性

All implementations of the Logger component support the following attributes:

Loggerコンポーネントの全ての実装は、以下の属性をサポートします:

Attribute Description
className Java class name of the implementation to use. This class must implement the org.apache.catalina.Logger interface. Because there is no single standard implementation, this attribute is required. See Standard Implementation Attributes for the names of the supported classes.
className 使う実装のJavaクラス名。 このクラスは、org.apache.catalina.Loggerインタフェースを実装しなければなりません。 一つの標準の実装がないので、この属性は必要です。 サポートされたクラスの名前については、標準実装属性を見てください。
verbosity The verbosity level for this logger. Messages with a higher verbosity than the specified level will be silently ignored. Available levels are 0 (fatal messages only), 1 (errors), 2 (warnings), 3 (information), and 4 (debug). If not specified, the default value is 1 (error). Note that messages logged with no verbosity parameter are logged unconditionally.
verbosity このloggerのための冗長レベル 指定されたレベルより高いverbosityによるメッセージは、黙って無視されることになります。 利用できるレベルは、0(致命的なメッセージだけ)、1(エラー)、2(警告)、3(情報)と4(デバッグ)です。 指定されないならば、デフォルトの値は1(エラー)です。 verbosityパラメータが無い場合には、メッセージが無条件で記録されることに注意。

Standard Implementation Attributes

標準実装属性

Unlike most other Catalina components, there is not a single standard implementation of the Logger component available. Instead, a variety of standard implementations are available for your use. To select one, use the specified value for the className attribute, and configure the remaining attributes as described below.

最も他のCatalinaコンポーネントと違って、利用できるLoggerコンポーネントの単一の標準実装がコンポーネントはありません。 その代わりに、いろいろな標準の実装は、あなたの使用に使えます。 そのうちのひとつを選ぶために、className属性に、指定された値を使ってください、そして、下記のように残っている属性を構成してください。

File Logger (org.apache.catalina.logger.FileLogger)

The File Logger records all logged messages (other than those ignored based on verbosity level) to disk file(s) in a specified directory. The actual filenames of the log files are created from a configured prefix, the current date in YYYY-MM-DD format, and a configured suffix. At midnight each night, the next logged message causes a switch to a new log file (based on the new date), without having to shut down Catalina in order to switch logs.

File Loggerは、指定されたディレクトリにおいてディスクfile(s)に全ての記録されたメッセージ(verbosityレベルに基づいて無視されるそれら以外の)を記録します。 ログ・ファイルの実際のファイル名は、構成された接頭辞、YYYY-MM-DDフォーマットの中の現在の日付と構成された接尾辞からつくられます。 各夜真夜中で、次の記録されたメッセージは、変わるためにCatalinaをシャットダウンしなければならないことのないファイル(新しい日付にもとづいた)が記録する新しいログへの切り替えを引き起こします。

The File Logger supports the following additional attributes:

Attribute Description
directory Relative or absolute pathname of the directory into which log files will be created. If a relative path is specified, it is interpreted as relative to $CATALINA_HOME. If no directory is specified, the default value is "logs" (relative to the Catalina home directory).
directory どちらがファイルを記録するか、ディレクトリの関連しているか絶対のパス名が、つくられることになります。 関連しているパスが指定されるならば、$CATALINA_HOMEと関連しているので、それは解釈されます。 ディレクトリが指定されないならば、デフォルトの値は「ログ」(Catalinaホーム・ディレクトリと関連している)です。
prefix The prefix added to the front of each log file name. If not specified, the default value is "catalina.". To specify no prefix, use a zero-length string.
prefix 接頭辞は、各ログ・ファイル名の正面を増しました。 指定されないならば、デフォルトの値は「catalina.」です。 接頭辞を指定しないために、ゼロ-長ストリングを使用してください。
suffix The suffix added to the end of each log file name. If not specified, the default value is ".log". To specify no suffix, use a zero-length string.
suffix 接尾辞は、各ログ・ファイル名の終わりまで加わりました。 指定されないならば、デフォルトの値は「.log」です。 接尾辞を指定しないために、ゼロ-長ストリングを使用してください。
timestamp Should log messages be date/time stamped? Set this value to true or false. If not specified, log messages will not be date/time stamped.
timestamp ログ・メッセージは、印を押される日付/時間であるはずですか? この値をtrueまたはfalseにセットしてください。 指定されないならば、ログ・メッセージは印を押される日付/時間であることにはならなりません。

Standard Error Logger (org.apache.catalina.logger.SystemErrLogger)

標準エラー Logger (org.apache.catalina.logger.SystemErrLogger)

The Standard Error Logger records all logged messages (other than those ignored based on verbosity level) to whatever stream the standard error output of Catalina is pointed at. The default Catalina startup script points this at file logs/catalina.out relative to $CATALINA_HOME. This Logger accepts no additional attributes.

Catalinaの標準のエラー出力が指さされて、たとえどんなストリームであっても、StandardエラーLoggerはメッセージ(verbosityレベルに基づいて無視されるそれら以外の)を記録される全てを記録します。 デフォルトのCatalinaスタートアップ・スクリプトは、$CATALINA_HOMEにこれをファイルlogs/catalina.out親戚に向けます。 このLoggerは、追加の属性を受け入れません。

Standard Output Logger (org.apache.catalina.logger.SystemOutLogger)

標準出力 Logger (org.apache.catalina.logger.SystemOutLogger)

The Standard Output Logger records all logged messages (other than those ignored based on verbosity level) to whatever stream the standard output of Catalina is pointed at. The default Catalina startup script points this at file logs/catalina.out relative to $CATALINA_HOME. This Logger accepts no additional attributes.

Catalinaの標準出力が指さされて、たとえどんなストリームであっても、Standard出力Loggerはメッセージ(verbosityレベルに基づいて無視されるそれら以外の)を記録される全てを記録します。 デフォルトのCatalinaスタートアップ・スクリプトは、$CATALINA_HOMEにこれをファイルlogs/catalina.out親戚に向けます。 このLoggerは、追加の属性を受け入れません。