JP2002366395A - Log output information management system - Google Patents

Log output information management system

Info

Publication number
JP2002366395A
JP2002366395A JP2001175178A JP2001175178A JP2002366395A JP 2002366395 A JP2002366395 A JP 2002366395A JP 2001175178 A JP2001175178 A JP 2001175178A JP 2001175178 A JP2001175178 A JP 2001175178A JP 2002366395 A JP2002366395 A JP 2002366395A
Authority
JP
Japan
Prior art keywords
log
output
program
channel
level
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2001175178A
Other languages
Japanese (ja)
Inventor
Haruo Fukuda
春生 福田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP2001175178A priority Critical patent/JP2002366395A/en
Publication of JP2002366395A publication Critical patent/JP2002366395A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PROBLEM TO BE SOLVED: To control the output of log information without changing a program constituted of a plurality of module groups. SOLUTION: A log output information management system is provided with a log management means which manages only one log mechanism existing in the program, one or more output means by which the program writes log message, and an output control means which decides whether log messages outputted to the output means it to be outputted or not, and the output control means is connected to the output means or a higher-order output control means to connect all output control means to a tree structure having the log management means as the top.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、複数のモジュール
群によって構成されたプログラムを変更することなく、
ログ情報の出力を制御することを可能としたログ出力情
報管理システムに関するものである。
[0001] The present invention relates to a method for modifying a program constituted by a plurality of module groups without changing the program.
The present invention relates to a log output information management system capable of controlling output of log information.

【0002】[0002]

【従来の技術】一般に、コンピュータに実装されたプロ
グラムは、その実行過程において、ログと呼ばれるメッ
セージ情報を蓄積、または別プログラムに対して出力す
る。ログ情報は、アクセス履歴の監査、障害発生時の状
態復元、障害発生時の通知、プログラム自身のバグ解析
など、様々な目的に使用される。
2. Description of the Related Art Generally, a program mounted on a computer accumulates message information called a log or outputs it to another program in the course of execution. The log information is used for various purposes such as auditing access history, restoring a state when a failure occurs, notifying when a failure occurs, and analyzing a bug in the program itself.

【0003】従来、コンピュータに実装された業務プロ
グラムを実行する過程で発生するログメッセージデータ
を制御する技術としては、特公平11−296415号
公報に記載のものがある。特公平11−296415号
公報には、各種のログメッセージデータに、それぞれラ
ンクデータを設定したログランク設定テーブルと出力対
象のログレベルを可変自在に記憶する出力レベル設定テ
ーブルとを設け、業務プログラムを実行する過程でログ
メッセージデータが発生すると、ログランク設定テーブ
ルを参照して、当該ログメッセージデータのランクを取
得することで、その取得したランクが出力レベル設定テ
ーブルに記憶されたログレベル以上か否かを判断し、ラ
ンクがログレベル以上の場合のみ、当該ログメッセージ
データをログ出力ファイルに出力する技術について開示
されている。
Conventionally, as a technique for controlling log message data generated in a process of executing a business program mounted on a computer, there is a technique disclosed in Japanese Patent Publication No. 11-296415. In Japanese Patent Publication No. 11-296415, a log rank setting table in which rank data is set and an output level setting table for variably storing log levels to be output are provided for various types of log message data. When log message data is generated in the course of execution, by referring to the log rank setting table and acquiring the rank of the log message data, whether the acquired rank is equal to or higher than the log level stored in the output level setting table is determined. A technique is disclosed in which the log message data is output to a log output file only when the rank is equal to or higher than the log level.

【0004】[0004]

【発明が解決しようとする課題】ところで、上記のよう
な従来の技術には次のような解決すべき課題があった。
即ち、近年、C++やJavaなどのオブジェクト指向
プログラミング言語によってソフトウェアを構築するこ
とが多くなってきている。この種のプログラミング言語
の大きな特徴として、Cなどの手続き型言語に比べ、コ
ードの再利用性が非常に高いことが挙げられる。このコ
ードの再利用はソースレベルに留まらず、オブジェクト
レベル(バイナリレベル)でも可能であり、このため、
各種の再利用可能なオブジェクト(モジュール)を構成
要素として取りまとめて、1つのソフトウェアを作成す
る手法が一般的となっている。
However, the above-mentioned prior art has the following problems to be solved.
That is, in recent years, software has often been constructed using an object-oriented programming language such as C ++ or Java. A significant feature of this type of programming language is that code reusability is extremely high as compared to procedural languages such as C. This code can be reused at the object level (binary level) as well as at the source level,
It is common to create a piece of software by combining various reusable objects (modules) as components.

【0005】このようなプログラム作成手法を使用する
場合、各モジュールの作成は他のモジュールの作成と非
依存に進めることが可能なため、高い開発効率を上げる
ことができるが、ソフトウェアとして取りまとめた後に
は、ログ情報の出力など、システムレベルでの情報操作
が困難になるという問題が発生する。これは、モジュー
ル間での情報共有手段を持たないことが、モジュールの
独立開発を可能にするためだからである。
When such a program creation method is used, the creation of each module can proceed independently of the creation of other modules, so that high development efficiency can be improved. However, there arises a problem that information operation at a system level becomes difficult such as output of log information. This is because the absence of information sharing means between modules enables independent development of modules.

【0006】また、ログ出力の観点から考えると、複数
のモジュール群で構成されたプログラムに対して上述の
従来技術を適用した場合、各モジュールに対してログラ
ンク設定テーブルと、出力レベル設定テーブルとを用意
する必要があるため、極めて設定が煩雑となってしまう
という問題が発生する。さらに、これらを統括して管理
する手段が提供されないため、ソフトウェアの内部構造
に通じていないと、所望のログ情報を出力するための設
定を行うことが不可能であるという問題が発生する。
From the viewpoint of log output, when the above-described conventional technique is applied to a program composed of a plurality of module groups, a log rank setting table, an output level setting table, Needs to be prepared, which causes a problem that the setting becomes extremely complicated. Furthermore, since a means for managing them collectively is not provided, there is a problem that it is impossible to make settings for outputting desired log information unless the internal structure of the software is established.

【0007】[0007]

【課題を解決するための手段】本発明のログ出力情報管
理システムは、以上の点を解決するため、複数のモジュ
ールによって構成されたプログラムを実行する過程で発
生するログメッセージ情報を管理するログ出力情報管理
システムであって、プログラム内にただ1つ存在するロ
グ機構を管理するログ管理手段と、プログラムがログメ
ッセージを書き込むための1つ以上の出力手段と、前記
出力手段に出力されたログメッセージの出力可否を判定
する出力制御手段とを備え、前記出力制御手段を前記出
力手段または上位の出力制御手段に接続することによ
り、すべての出力制御手段を、前記ログ管理手段を頂点
とする木構造に接続することを特徴とする。
SUMMARY OF THE INVENTION A log output information management system according to the present invention solves the above problems by providing a log output for managing log message information generated in the course of executing a program constituted by a plurality of modules. An information management system, comprising: a log management unit that manages a single log mechanism existing in a program; one or more output units for writing a log message by the program; and a log message output to the output unit. Output control means for determining whether output is possible or not, and by connecting the output control means to the output means or a higher-level output control means, all the output control means have a tree structure having the log management means at the top. Is connected to.

【0008】また、本発明のログ出力情報管理システム
は、前記出力制御手段の判定において、該出力制御手段
に明示的な出力設定が行われている場合にはそれに従
い、明示的な出力設定が行われていない場合には、上位
の出力制御手段に判定を委譲することを特徴とする。
Further, in the log output information management system of the present invention, in the judgment of the output control means, if an explicit output setting is made in the output control means, the explicit output setting is made according to the setting. If not, the determination is delegated to a higher-level output control means.

【0009】また、本発明のログ出力情報管理システム
は、前記上位の出力制御手段に明示的な出力設定が行わ
れていない場合には、前記木構造のルートノードである
さらに上位の出力制御手段に判定を委譲することを特徴
とする。
Further, in the log output information management system according to the present invention, when an explicit output setting is not performed in the higher-level output control means, a higher-level output control means which is a root node of the tree structure. The determination is delegated to

【0010】[0010]

【発明の実施の形態】以下、本発明の実施の形態を具体
例を用いて説明する。 〈具体例1〉図1は、本発明のログ出力情報管理システ
ムの第1の実施の形態について説明するためのプログラ
ム構成図である。本構成図はプログラム内に配置された
ログ出力関連のオブジェクトを示したものである。具体
例1では、プログラムは第1のモジュール102および
第2のモジュール105により構成されているものとす
る。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Embodiments of the present invention will be described below using specific examples. <Specific Example 1> FIG. 1 is a program configuration diagram for explaining a first embodiment of a log output information management system according to the present invention. This configuration diagram shows objects related to log output arranged in the program. In the specific example 1, it is assumed that the program includes the first module 102 and the second module 105.

【0011】図1において、ログマネージャ101は、
プログラム内のログ出力機構全体を管理するものであ
り、プロセス内にただ1つだけ存在することが保証され
たオブジェクトである。このログマネージャ101は、
後述するログチャネル103およびログチャネル106
と接続(通信)して、これらのログチャネル103およ
びログチャネル106から、設定可能な出力レベルなど
の設定情報の獲得、並びにプログラムに対するログ出力
レベルなどの設定を各ログチャネル103およびログチ
ャネル106に伝達する役割を持つ。
In FIG. 1, a log manager 101 comprises:
It manages the entire log output mechanism in a program, and is an object that is guaranteed to exist only once in a process. This log manager 101
Log channel 103 and log channel 106 to be described later
Connection (communication) with the log channel 103 and the log channel 106 to obtain setting information such as a settable output level from the log channel 103 and the log channel 106 and to set the log output level and the like for the program to each log channel 103 and the log channel 106 Has the role of communicating.

【0012】モジュール102およびモジュール105
は、それぞれプログラムを構成する第1および第2のモ
ジュールである。各モジュール102およびモジュール
105には、それぞれ、各モジュール内のログ情報を管
理するログチャネル103およびログチャネル106
が、それぞれ1つ以上存在する。
Module 102 and module 105
Are first and second modules respectively constituting a program. Each of the modules 102 and 105 has a log channel 103 and a log channel 106 for managing log information in each module.
Are present one or more times.

【0013】ログチャネル103およびログチャネル1
06は、1つ以上の出力ストリームを制御するログチャ
ネルである。各ログチャネル103およびログチャネル
106は、ログマネージャ101に属し、レベルとして
関連付けられた1つの出力ストリーム104、またはレ
ベルとして関連付けられた複数の出力ストリーム群10
7と接続(通信)する。ログチャネル103は1つの出
力ストリーム104とだけ接続(通信)し、ログチャネ
ル106は複数の出力ストリーム群107と接続(通
信)する。
Log channel 103 and log channel 1
06 is a log channel that controls one or more output streams. Each log channel 103 and log channel 106 belong to the log manager 101 and have one output stream 104 associated as a level or a plurality of output stream groups 10 associated as levels.
7 (communication). The log channel 103 connects (communicates) with only one output stream 104, and the log channel 106 connects (communicates) with a plurality of output stream groups 107.

【0014】ログチャネル103およびログチャネル1
06は、ログ出力レベルおよびログメッセージの出力先
に関する設定情報を所有し、管理下にある出力ストリー
ム104または107からのログメッセージを受信する
と、ログ出力を行うか否かの判定をログ出力設定情報に
基づいて行う。もし、当該ログチャネルに明示的な出力
設定が行われていない場合には、ログマネージャ101
に設定されている出力に関する既定値に従って処理を行
う。
Log channel 103 and log channel 1
06 has the log output level and the setting information regarding the output destination of the log message, and upon receiving the log message from the output stream 104 or 107 under the management, determines whether or not to perform the log output. Perform based on. If the log channel has not been explicitly set for output, the log manager 101
Performs processing according to the default value for the output set in.

【0015】出力ストリーム104および出力ストリー
ム群107は、ログ出力のためのストリームオブジェク
トである。プログラムはそれぞれのモジュール内の出力
ストリームに対してログメッセージを書き込む。例えば
第1のモジュール102内に記述されているプログラム
がログ出力を行う場合には、出力ストリーム104に対
してメッセージの書き込みを行う。また、ログチャネル
106には複数の出力ストリーム群107が関連付けら
れている。これらの出力ストリーム群は複数設定した出
力レベルごとに割り当てられて生成される。
The output stream 104 and the output stream group 107 are stream objects for log output. The program writes log messages to the output stream in each module. For example, when a program described in the first module 102 performs log output, a message is written to the output stream 104. Also, a plurality of output stream groups 107 are associated with the log channel 106. These output streams are assigned and generated for each of a plurality of set output levels.

【0016】管理クライアント108は、プログラムの
運用管理者が使用するものである。運用管理者は動作中
のプログラムに対して、管理クライアント108を経由
してログマネージャ101に対する設定を行う。プログ
ラム(モジュール102およびモジュール105等)内
に存在する全てのログチャネル(ログチャネル103お
よびログチャネル106等)は、ログマネージャ101
と接続(通信)しているので、運用管理者はプログラム
の内部構造や各モジュールに固有な情報を事前に知るこ
となく、設定作業を行うことができる。例えば、任意の
プログラム内のあるモジュールに障害が発生した場合、
プログラムを停止させることなく、そのモジュールだけ
をデバッグ用の出力モードに移行させることが可能とな
る。
The management client 108 is used by the operation manager of the program. The operation manager makes settings for the running program via the management client 108 for the log manager 101. All log channels (such as log channel 103 and log channel 106) existing in the program (such as module 102 and module 105) are stored in log manager 101.
Since it is connected to (communicated with) the operation manager can perform setting work without knowing in advance the internal structure of the program and information unique to each module. For example, if a module in any program fails,
It is possible to shift only the module to the output mode for debugging without stopping the program.

【0017】〈具体例1の動作〉次に、以上のように構
成された本発明による第1の実施例に対し、ログ出力の
過程(動作)について説明を行う。
<Operation of Specific Example 1> Next, the log output process (operation) of the first embodiment of the present invention configured as described above will be described.

【0018】[ステップ1]まず、第2のモジュール1
05を構成するプログラムがログチャネル106を生成
する。この生成がプログラム内で最初のログチャネルで
あれば、これと同時にログマネージャ101が内部で自
動的に生成される。もし、2個目以降のログチャネルで
あれば、既に生成されたログマネージャ101と接続
(通信)する。
[Step 1] First, the second module 1
05 generates the log channel 106. If this generation is the first log channel in the program, the log manager 101 is automatically generated internally at the same time. If the log channel is the second or subsequent log channel, it connects (communicates) with the already generated log manager 101.

【0019】[ステップ2]第2のモジュール105を
構成するプログラムが複数レベルのログ出力を行うこと
をログチャネル106に要求する。ログ出力レベルと
は、例えば、以下のようなレベルである。 障害レベル プログラムの動作に影響を与える深刻な障害が発生した
場合にのみログを出力するレベル。 警告レベル 障害レベルの情報に加えて、プログラムの動作上に問題
は無いが何らかの障害を感知した場合にログを出力する
レベル。 通知レベル 警告レベルまでの情報に加えて、プログラム内の状態変
化など、プログラムの内部状態の概略を把握するための
情報を出力するレベル。 追跡レベル 通知レベルまでの情報に加えて、プログラム内のメソッ
ドゴールに関する情報などプログラムの動作を把握する
ための情報を把握するレベル。 デバッグレベル 追跡レベルまでの情報に加えて、プログラムのデバッグ
を行うための非常に詳細な情報を出力するレベル。
[Step 2] The program constituting the second module 105 requests the log channel 106 to output a plurality of levels of logs. The log output level is, for example, the following level. Failure level A level that outputs a log only when a serious failure that affects the operation of the program occurs. Warning level In addition to the information on the failure level, this is the level at which there is no problem in the operation of the program but a log is output when any failure is detected. Notification level In addition to the information up to the warning level, this is the level that outputs information for grasping the outline of the internal state of the program, such as changes in the state of the program. Tracking level In addition to the information up to the notification level, this is the level at which information about the program operation, such as information on method goals in the program, is grasped. Debug level In addition to information up to the trace level, a level that outputs very detailed information for debugging programs.

【0020】[ステップ3]ログチャネル106は要求
されたレベル数分の出力ストリーム群107を生成し
て、プログラムに対して発行する。
[Step 3] The log channel 106 generates output streams 107 for the requested number of levels and issues them to the program.

【0021】[ステップ4]プログラムが出力ストリー
ム群107内の、所定の出力ストリームに対してログメ
ッセージを出力する。
[Step 4] The program outputs a log message to a predetermined output stream in the output stream group 107.

【0022】[ステップ5]ログメッセージを受信した
出力ストリームは、そのメッセージをそのままログチャ
ネル106に対して送信する。
[Step 5] The output stream that has received the log message transmits the message to the log channel 106 as it is.

【0023】[ステップ6]ログメッセージを受信した
ログチャネル106は、その出力元であるストリームに
関連付けられた出力レベルと出力が許可されている設定
レベルとの比較を行う。もし、ストリームのレベルが設
定レベルを上回り、出力可能な条件を満足していれば、
ログチャネル106はログメッセージをファイルなどの
出力先に対して書き込む。逆に出力可能な条件を満足し
ていない場合には、ログチャネル106はそのログメッ
セージを無視する。また、ログチャネル106に明示的
に出力レベルが設定されていない場合には、ログマネー
ジャ101に設定されている既定値に従って判断を行
う。
[Step 6] Upon receiving the log message, the log channel 106 compares the output level associated with the stream from which the log message is output with the set level at which output is permitted. If the stream level exceeds the set level and satisfies the conditions that can be output,
The log channel 106 writes a log message to an output destination such as a file. On the other hand, when the conditions that can be output are not satisfied, the log channel 106 ignores the log message. If the output level is not explicitly set in the log channel 106, the determination is made according to the default value set in the log manager 101.

【0024】以上、第2のモジュール105内での動作
に関して説明を行ったが、第1のモジュール102につ
いても同等の処理が実行される。
The operation in the second module 105 has been described above, but the same processing is also performed in the first module 102.

【0025】〈具体例1の効果〉以上、説明したように
具体例1によれば、プログラム内に存在する全てのログ
出力用のストリームを、プログラム内でただ1つだけ存
在することを保証したログマネージャ101により管理
するようにしたので、プログラムの運用管理者はログマ
ネージャ101にアクセスすることで、すべての出力ス
トリームに対する設定作業を行うことができる。
<Effect of Specific Example 1> According to the specific example 1, as described above, it is guaranteed that only one log output stream existing in the program exists in the program. Since the management is performed by the log manager 101, the operation manager of the program can perform setting work for all output streams by accessing the log manager 101.

【0026】また、運用管理者は、ログマネージャ10
1から設定可能な情報を取得することができるため、プ
ログラムの内部構造や各モジュールに関する情報を事前
に知る必要が無く、巨大で複雑なプログラムに対しても
簡単に出力レベルや出力先を設定することが可能とな
る。
Further, the operation manager operates the log manager 10.
Since it is possible to acquire information that can be set from the first step, there is no need to know in advance the internal structure of the program and information about each module, and the output level and output destination can be easily set even for a huge and complicated program. It becomes possible.

【0027】また、出力情報の既定値として、ログマネ
ージャ101の設定情報を共通的に利用することによ
り、個々のログチャネルに対して出力設定を行わなくて
も、ログマネージャの既定値を設定しなおすことで、一
括して出力状態を変化させることが可能となる。
Further, by using the setting information of the log manager 101 in common as the default value of the output information, the default value of the log manager can be set without performing the output setting for each log channel. By doing so, it is possible to change the output state collectively.

【0028】さらに、ログマネージャ101は暗黙に作
成されるため、各モジュール作成者は、他モジュールと
の連携を気にせずに開発を行うことができる。
Furthermore, since the log manager 101 is created implicitly, each module creator can perform development without worrying about cooperation with other modules.

【0029】〈具体例2〉図2は、本発明のログ出力情
報管理システムの第2の実施の形態について説明するた
めのプログラム構成図である。本構成図は第1の実施例
と同様にプログラム内に配置されたログ出力関連のオブ
ジェクトを示したものである。
<Specific Example 2> FIG. 2 is a program configuration diagram for explaining a second embodiment of the log output information management system of the present invention. This configuration diagram shows objects related to log output arranged in the program as in the first embodiment.

【0030】ログマネージャ201は、プログラム内の
ログ出力機構全体を管理するものであって、プロセス内
にただ1つだけ存在することが保証されたオブジェクト
である。このログマネージャ201は、後述するログコ
ントローラ203から設定可能な出力レベルなどの設定
情報の獲得、およびプログラムに対するログ出力レベル
などの設定を、各ログコントローラに伝達する役割を有
する。
The log manager 201 manages the entire log output mechanism in the program, and is an object that is guaranteed to exist only once in a process. The log manager 201 has a role of acquiring setting information such as an output level that can be set from a log controller 203 described later, and transmitting settings such as a log output level for a program to each log controller.

【0031】モジュール202は、プログラムを構成す
る第1のモジュールであり、モジュール206は、第1
のモジュール202を継承して作成した第2のモジュー
ルである。
The module 202 is a first module constituting a program, and the module 206 is a first module.
This is a second module created by inheriting the module 202 of FIG.

【0032】ログコントローラ203は、モジュール内
のログ出力を制御するものである。具体例2におけるロ
グ機構を利用するモジュールは、1つ以上のログコント
ローラ203を、そのオブジェクト内で所有する必要が
ある。ログコントローラ203は、モジュール内のログ
出力を制御する役割を持ち、既定の出力レベル、出力先
などに関する情報を管理する。本具体例では、ログコン
トローラ203は、1つのログマネージャ201の管理
下にあり、かつ、継承クラスのモジュール(例えば、モ
ジュール206等)からアクセス可能なオブジェクトで
あるとする。
The log controller 203 controls the log output in the module. The module using the log mechanism in the specific example 2 needs to own one or more log controllers 203 in the object. The log controller 203 has a role of controlling log output in the module, and manages information on a predetermined output level, an output destination, and the like. In this specific example, it is assumed that the log controller 203 is an object that is managed by one log manager 201 and that can be accessed from a module of the inherited class (for example, the module 206).

【0033】また、プログラム内で最初のログコントロ
ーラが作成されると同時に、ログマネージャ201が作
成される。これにより、ログマネージャ201は、プロ
グラム内でただ1つだけ存在することが保証される。
A log manager 201 is created at the same time that the first log controller is created in the program. This guarantees that only one log manager 201 exists in the program.

【0034】ログチャネル204,207,208,お
よび210は、出力ストリームまたは下位のログチャネ
ルを制御するためのログチャネルである。各ログチャネ
ルはログコントローラ203または上位のログチャネル
の管理下にあり、かつ、1つの出力ストリーム(または
ストリーム群)または1つ以上のログチャネルを管理す
る。本具体例では、ログチャネル204は、1つの出力
ストリーム群205だけを管理し、ログチャネル207
は、2つのログチャネル208および210を管理して
いる。
The log channels 204, 207, 208 and 210 are log channels for controlling an output stream or a lower log channel. Each log channel is under the control of the log controller 203 or a higher-level log channel, and manages one output stream (or stream group) or one or more log channels. In this specific example, the log channel 204 manages only one output stream group 205 and the log channel 207.
Manages two log channels 208 and 210.

【0035】ログチャネルはログ出力レベルおよびログ
出力先に関する設定情報を所有し、管理下にある出力ス
トリーム、またはログチャネルからのログメッセージを
受信すると、ログ出力を行うか否かの判定をログ出力設
定情報に基づいて行う。もし、当該ログチャネルに明示
的に出力レベル情報が設定されていない場合には、ログ
メッセージを上位のログチャネルにフォワードする。ま
た、ログチャネルが204に示したもの(ログチャネル
204)のように、ログコントローラ203に直結され
ているような場合には、ログコントローラ203に設定
されている出力に関する既定値に従って判断を行う。
The log channel owns the setting information on the log output level and the log output destination, and upon receiving a log message from an output stream under control or a log channel, determines whether or not to perform log output. This is performed based on the setting information. If the output level information is not explicitly set in the log channel, the log message is forwarded to the upper log channel. Further, when the log channel is directly connected to the log controller 203 like the one indicated by the log channel 204 (the log channel 204), the determination is made according to the default value regarding the output set in the log controller 203.

【0036】出力ストリーム群205、出力ストリーム
209および211は、ログ出力のためのストリームオ
ブジェクトである。プログラムはそれぞれが属するモジ
ュール内の出力ストリームに対してログメッセージを書
き込む。例えば、第1のモジュール202内に記述され
ているプログラムがログ出力を行う場合には、出力スト
リーム群205の所定の出力ストリームに対してメッセ
ージの書き込みを行う。
The output stream group 205 and the output streams 209 and 211 are stream objects for log output. The program writes a log message to the output stream in the module to which it belongs. For example, when a program described in the first module 202 performs log output, a message is written to a predetermined output stream of the output stream group 205.

【0037】なお、この本具体例では、管理クライアン
ト(具体例1での管理クライアント108)は省略して
いるが、本具体例においても動作中のプログラム内のロ
グ出力レベルを動的に設定するために同様に使用するこ
とは勿論である。
In this specific example, the management client (the management client 108 in the specific example 1) is omitted, but also in this specific example, the log output level in the running program is dynamically set. It goes without saying that it is used similarly.

【0038】〈具体例2の動作〉次に、以上のように構
成された本発明による第2の実施例に対し、ログ出力の
過程(動作)について説明を行う。
<Operation of Specific Example 2> Next, the log output process (operation) of the second embodiment according to the present invention configured as described above will be described.

【0039】まず、ログ出力機構の形成(動作)につい
て説明を行う。 [ステップ1]第1のモジュール202の作成者は、ロ
グコントローラ203、およびその管理下にあるログチ
ャネル204、およびその管理下にある出力ストリーム
群205をプログラム内で作成する。このとき、ログコ
ントローラ203は、継承クラス(モジュール206
等)から直接または間接的に参照可能なように作成して
おく。また、第1のモジュール内のプログラムは、出力
ストリーム群205のいずれかに対してログメッセージ
を書き込むようにする。
First, the formation (operation) of the log output mechanism will be described. [Step 1] The creator of the first module 202 creates a log controller 203, a log channel 204 under its management, and an output stream group 205 under its management in a program. At this time, the log controller 203 executes the inherited class (the module 206
Etc.) so that they can be referenced directly or indirectly. Further, the program in the first module writes a log message to any of the output stream groups 205.

【0040】[ステップ2]次に第1のモジュール20
2を継承した第2のモジュール206の作成者は、第1
のモジュール202が公開するログコントローラ203
と接続(通信)するようにログチャネル207を作成す
る。
[Step 2] Next, the first module 20
The creator of the second module 206 that inherited the second
Log controller 203 published by the module 202
A log channel 207 is created so as to connect (communicate) with the log channel.

【0041】[ステップ3]また、第2のモジュール2
06の作成者は、必要に応じてログチャネル207の下
位にログチャネルまたは出力ストリームを作成する。こ
の例では、2つの出力ストリーム209、211を作成
している。第2のモジュールでは、これらの出力ストリ
ーム209または出力ストリーム211に対してログ情
報を書き込むようにする。
[Step 3] Second module 2
The creator of 06 creates a log channel or an output stream below the log channel 207 as necessary. In this example, two output streams 209 and 211 are created. In the second module, log information is written to these output streams 209 or 211.

【0042】このようにログチャネルを生成すること
で、継承して作成したクラスであっても、あるモジュー
ルは1つのログコントローラ203を頂点とした木構造
を形成した構成とすることができる。
By generating a log channel in this way, even if a class is inherited and created, a certain module can be configured to form a tree structure with one log controller 203 as a vertex.

【0043】次にこのように形成したログ出力機構に対
して、そのログ出力の過程(動作)について説明を行
う。ここでは、出力ストリーム209に対する出力制御
を例にとり、説明を行う。
Next, the log output process (operation) of the log output mechanism thus formed will be described. Here, the output control for the output stream 209 will be described as an example.

【0044】[ステップ1]まず、第2のモジュール2
06内のプログラムが出力ストリーム209に対してロ
グメッセージを書き込む。
[Step 1] First, the second module 2
The program in 06 writes a log message to the output stream 209.

【0045】[ステップ2]出力ストリーム209は入
力されたメッセージをそのまま、このストリームを管理
するログチャネル208に送る。
[Step 2] The output stream 209 sends the input message as it is to the log channel 208 which manages this stream.

【0046】[ステップ3]ログチャネル208は、こ
のチャネルに対して明示的な出力設定が行われているか
否かについて判断する。もし、明示的な設定(出力レベ
ルや出力先)が指定されていれば、その指定に従う。明
示的な設定が指定されていない場合には、上位のログチ
ャネル207にメッセージを送る。
[Step 3] The log channel 208 determines whether an explicit output setting has been made for this channel. If an explicit setting (output level or output destination) is specified, the specification is followed. If no explicit setting is specified, a message is sent to the upper log channel 207.

【0047】[ステップ4]ログメッセージを受信した
ログチャネル207は、ログチャネル208と同様に、
まず、自チャネルに対する明示的な出力設定の有無を確
認する。出力設定が行われている場合には、その設定に
従って処理を行う。一方、明示的な出力設定が行われて
いない場合であるが、この場合、ログチャネル207
は、ログコントローラ203の管理下にあり、ログチャ
ネルによって形成する階層構造のルートノードであるの
で、ログコントローラ203に設定されている既定値情
報を読み出して、その設定値に従った処理を行う。
[Step 4] The log channel 207 that has received the log message, like the log channel 208,
First, it is confirmed whether or not there is an explicit output setting for the own channel. If the output setting has been made, processing is performed according to the setting. On the other hand, the case where the explicit output setting has not been performed, in this case, the log channel 207
Is a root node of a hierarchical structure formed by a log channel under the control of the log controller 203, and reads out default value information set in the log controller 203 and performs processing according to the set value.

【0048】〈具体例2の効果〉以上、説明したように
具体例2によれば、具体例1の効果に加えて、ログチャ
ネルの階層構造によりプログラム内に存在する全てのロ
グ出力ストリームがログマネージャを頂点とする木構造
で管理されるようにしたこと、また、各モジュールに既
定値の設定を可能とするログコントローラを導入したこ
と、また、モジュール内でもログコントローラを頂点と
する木構造を形成するようにしたことにより、モジュー
ル間およびモジュール内のプログラムの論理的な構造を
反映したログ出力構造を形成することが可能となる。こ
れにより、ログ設定を直感的な表現で行えるために、運
用管理者のログ設定に対する負担を大幅に減らすことが
可能となる。
<Effects of Specific Example 2> As described above, according to Specific Example 2, in addition to the effects of Specific Example 1, all log output streams existing in the program due to the hierarchical structure of the log channels are logged. It is managed by a tree structure with a manager at the top, and a log controller that allows setting of default values to each module has been introduced. With this configuration, it is possible to form a log output structure that reflects the logical structure of a program between modules and within a module. As a result, the log setting can be performed in an intuitive expression, so that the burden on the log setting of the operation manager can be significantly reduced.

【0049】また、複数のモジュールが継承、集約等に
より複雑に関連しあったプログラムであっても、木構造
の上位に存在するノードに対する設定を下位ノードに対
する既定値の情報として利用するために、運用管理の手
間を軽減することが可能である。例えば、あるモジュー
ルの頂点のノードに位置するログコントローラの設定を
変更することで、そのモジュール全体に対する設定を一
括して行うことができる。逆に下位の特定のストリーム
だけを出力したい場合には上位ノードで他ストリームヘ
の出力を抑制して、該ストリームの出力のみを可能とす
ることも容易に行い得る。
Even for a program in which a plurality of modules are complicatedly related to each other through inheritance, aggregation, and the like, in order to use the setting for a node existing at a higher level in the tree structure as default value information for a lower node, Operation management can be reduced. For example, by changing the setting of the log controller located at the node at the top of a certain module, the setting for the entire module can be performed collectively. Conversely, when it is desired to output only a specific lower stream, it is possible to easily output only the stream by suppressing the output to another stream in the upper node.

【0050】尚、上記発明によれば、ログメッセージの
出力先として、ファイルへの書き込みを例に説明した
が、これはコンピュータ上の端末やネットワーク上に存
在するログメッセージ受信用のサーバなどに対する出力
であってもよい。また、ログチャネルが管理する情報と
して、出力レベル、出力先の情報の2つについて説明し
たが、この他に各チャネルに関する情報を運用管理者に
示すためのコメント等の情報を付加しても良い。
According to the above-described invention, the log message is output to a file as an output destination. However, the log message is output to a terminal on a computer or a server on a network for receiving a log message. It may be. In addition, two types of information managed by the log channel, that is, output level and output destination information, have been described. In addition, information such as a comment for indicating information about each channel to the operation manager may be added. .

【0051】[0051]

【発明の効果】プログラム内にただ1つ存在するログ機
構を管理するログ管理手段と、プログラムがログメッセ
ージを書き込むための出力手段と、出力手段に出力され
たログメッセージの出力可否を判定する出力制御手段を
設け、出力制御手段を出力手段または上位の出力制御手
段に接続することにより、すべての出力制御手段を、ロ
グ管理手段を頂点とする木構造に接続するようにしたの
で、複数のモジュール群によって構成されたプログラム
を変更することなく、ログ情報の出力を制御することが
できる。
According to the present invention, log management means for managing only one log mechanism existing in a program, output means for writing a log message by the program, and output for judging whether or not the log message output to the output means can be output. By providing the control means and connecting the output control means to the output means or a higher-level output control means, all the output control means are connected to a tree structure having the log management means at the top. The output of the log information can be controlled without changing the program configured by the group.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明のログ出力情報管理システムの第1の実
施の形態について説明するためのプログラム構成図であ
る。
FIG. 1 is a program configuration diagram for describing a first embodiment of a log output information management system of the present invention.

【図2】本発明のログ出力情報管理システムの第2の実
施の形態について説明するためのプログラム構成図であ
る。
FIG. 2 is a program configuration diagram for explaining a log output information management system according to a second embodiment of the present invention;

【符号の説明】[Explanation of symbols]

101 ログマネージャ 102 第1のモジュール 103,106 ログチャネル 104 出力ストリーム 105 第2のモジュール 107 出力ストリーム群 108 管理クライアント 201 ログマネージャ 202 第1のモジュール 203 ログコントローラ 204,207,208,210 ログチャネル 205 出力ストリーム群 206 第2のモジュール 209,211 出力ストリーム 101 log manager 102 first module 103, 106 log channel 104 output stream 105 second module 107 output stream group 108 management client 201 log manager 202 first module 203 log controller 204, 207, 208, 210 log channel 205 output Stream group 206 second module 209,211 output stream

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 複数のモジュールによって構成されたプ
ログラムを実行する過程で発生するログメッセージ情報
を管理するログ出力情報管理システムであって、 プログラム内にただ1つ存在するログ機構を管理するロ
グ管理手段と、 プログラムがログメッセージを書き込むための1つ以上
の出力手段と、 前記出力手段に出力されたログメッセージの出力可否を
判定する出力制御手段とを備え、 前記出力制御手段を前記出力手段または上位の出力制御
手段に接続することにより、すべての出力制御手段を、
前記ログ管理手段を頂点とする木構造に接続することを
特徴とするログ出力情報管理システム。
1. A log output information management system for managing log message information generated in a process of executing a program constituted by a plurality of modules, wherein the log management manages a single log mechanism existing in the program. Means, at least one output means for a program to write a log message, and output control means for determining whether or not the log message output to the output means can be output, wherein the output control means comprises the output means or By connecting to the higher-level output control means, all output control means
A log output information management system, wherein the log management means is connected to a tree structure having vertices.
【請求項2】 前記出力制御手段の判定において、該出
力制御手段に明示的な出力設定が行われている場合には
それに従い、明示的な出力設定が行われていない場合に
は、上位の出力制御手段に判定を委譲することを特徴と
する請求項1に記載のログ出力情報管理システム。
2. In the determination of the output control means, if an explicit output setting has been performed on the output control means, the output control means must follow it. 2. The log output information management system according to claim 1, wherein the determination is delegated to an output control unit.
【請求項3】 前記上位の出力制御手段に明示的な出力
設定が行われていない場合には、前記木構造のルートノ
ードであるさらに上位の出力制御手段に判定を委譲する
ことを特徴とする請求項2に記載のログ出力情報管理シ
ステム。
3. The method according to claim 2, wherein, when an explicit output setting is not performed on the higher-level output control means, the determination is delegated to a higher-level output control means which is a root node of the tree structure. The log output information management system according to claim 2.
JP2001175178A 2001-06-11 2001-06-11 Log output information management system Pending JP2002366395A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001175178A JP2002366395A (en) 2001-06-11 2001-06-11 Log output information management system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001175178A JP2002366395A (en) 2001-06-11 2001-06-11 Log output information management system

Publications (1)

Publication Number Publication Date
JP2002366395A true JP2002366395A (en) 2002-12-20

Family

ID=19016361

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001175178A Pending JP2002366395A (en) 2001-06-11 2001-06-11 Log output information management system

Country Status (1)

Country Link
JP (1) JP2002366395A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014204455A1 (en) * 2013-06-19 2014-12-24 Hewlett-Packard Development Company, L.P. Unifying application log messages using runtime instrumentation

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014204455A1 (en) * 2013-06-19 2014-12-24 Hewlett-Packard Development Company, L.P. Unifying application log messages using runtime instrumentation

Similar Documents

Publication Publication Date Title
US6681243B1 (en) Network environment supporting mobile agents with permissioned access to resources
US8271956B2 (en) System, method and program product for dynamically adjusting trace buffer capacity based on execution history
US20080222617A1 (en) Server side application integration framework
CN111930489B (en) Task scheduling method, device, equipment and storage medium
WO2012151162A2 (en) Method and system for dynamically creating and servicing master-slave pairs within and across switch fabrics of a portable computing device
CN111782205B (en) Universal software deployment monitoring method
JP2013542524A (en) Intelligent interface for distributed control systems.
JP2002182909A (en) Method to share application definition
US20030130980A1 (en) Efficient configuration data migration technique
CN105095044A (en) SNMP based server monitoring method and apparatus
JP3940399B2 (en) An object-oriented framework for general purpose adaptive control
US20070288512A1 (en) Resource management program, resource management process, and resource management apparatus
US11500690B2 (en) Dynamic load balancing in network centric process control systems
CN111984561A (en) IPMI command processing method, system, device and medium for BMC
CN111400041A (en) Server configuration file management method and device and computer readable storage medium
US11106435B1 (en) OPC UA server, system operating using OPC UA, and method of executing OPC UA system
JP2005124204A (en) Network monitoring method and system
US7805734B2 (en) Platform management of high-availability computer systems
US8276150B2 (en) Methods, systems and computer program products for spreadsheet-based autonomic management of computer systems
US7636711B2 (en) Extensible workflows
US8356309B1 (en) Graphical display of management data obtained from an extensible management server
JP2002366395A (en) Log output information management system
US20050132039A1 (en) Data processing system with automatable administration and method for automated administration of a data processing system
CN118394533B (en) Resource scheduling method, computer device, storage medium, and program product
JP2005149332A (en) Workflow management system and program therefor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070208

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20081226

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20091117

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20100316