org.apache.log4j.net
クラス SocketServer

java.lang.Object
  |
  +--org.apache.log4j.net.SocketServer

public class SocketServer
extends Object

A SocketNode based server that uses a different hierarchy for each client.

各クライアントに対し異なる階層を使用する SocketNode ベースのサーバです。

Usage: java org.apache.log4j.net.SocketServer port configFile configDir

使用方法: java org.apache.log4j.net.SocketServer port configFile configDir

where port is a part number where the server listens, configFile is a configuration file fed to the PropertyConfigurator and configDir is a path to a directory containing configuration files, possibly one for each client host.

port の部分は、サーバが受け付けるポート番号、 configFile は、PropertyConfiguratorに与える設定ファイルで、そして、configDir は、できる限り、各クライアントのホストに対し一つの設定ファイルを含むディレクトリへのパスです。

The configFile is used to configure the log4j default hierarchy that the SocketServer will use to report on its actions.

configFile は、log4jのデフォルト階層を設定するために使用され、SocketServer は、そのアクション上でレポートを作成するためにその階層を使用します。

When a new connection is opened from a previously unknown host, say foo.bar.net, then the SocketServer will search for a configuration file called foo.bar.net.lcf under the directory configDir that was passed as the third argument. If the file can be found, then a new hierarchy is instantiated and configured using the configuration file foo.bar.net.lcf. If and when the host foo.bar.net opens another connection to the server, then the previously configured hierarchy is used.

新しい接続が前もって知らされていない foo.bar.net というホストからオープンされた時、SocketServer は、3番目の引数で渡される configDir ディレクトリ配下の foo.bar.net.lcf と呼ばれる設定ファイルを検索します。 ファイルが見つかった場合、新しい階層のインスタンスが生成され、設定ファイル foo.bar.net.lcf を使って設定されます。 もし、ホスト foo.bar.net がサーバに対し、別の接続をオープンする時は、前もって設定された階層が私用されます。

In case there is no file called foo.bar.net.lcf under the directory configDir, then the generic hierarchy is used. The generic hierarchy is configured using a configuration file called generic.lcf under the configDir directory. If no such file exists, then the generic hierarchy will be identical to the log4j default hierarchy.

ディレクトリ configDir 配下に foo.bar.net.lcf と呼ばれるファイルが存在しない時、一般的な 階層が使用されます。 一般的な階層は、configDir ディレクトリ配下の generic.lcf と呼ばれる設定ファイルを使って設定されます。 もし、そのようなファイルが存在しない場合は、その一般的階層は、log4j のデフォルト階層と同一と見なされます。

Having different client hosts log using different hierarchies ensures the total independence of the clients with respect to their logging settings.

異なる階層を使って異なるクライアントホストのログを持つと、ロギングの設定に関してクライアントを全体に渡り、独立させることになります。

Currently, the hierarchy that will be used for a given request depends on the IP address of the client host. For example, two separate applicatons running on the same host and logging to the same server will share the same hierarchy. This is perfectly safe except that it might not provide the right amount of independence between applications. The SocketServer is intended as an example to be enhanced in order to implement more elaborate policies.

現在、与えられた要求に関して使用される階層は、クライアントホストのIPアドレスに依存しています。 例えば、同じホストで2つに分けられたアプリケーションが動作し、同じサーバに対してログを行っている場合、同じ階層を共有するでしょう。 アプリケーション間で独立している物の正確な数を提供しない以外、これは、全く安全です。 SocketServer は、より複雑なポリシーを実装するために、強化されるための例となるよう意図されています。

導入されたバージョン:
1.0
作成者:
Ceki Gülcü

コンストラクタの概要
SocketServer(File directory)
           
 
メソッドの概要
static void main(String[] argv)
           
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

SocketServer

public SocketServer(File directory)
メソッドの詳細

main

public static void main(String[] argv)


Please notify me about new log4j releases.