JP2004046717A - Logging device, logging method, and logging program - Google Patents
Logging device, logging method, and logging program Download PDFInfo
- Publication number
- JP2004046717A JP2004046717A JP2002205805A JP2002205805A JP2004046717A JP 2004046717 A JP2004046717 A JP 2004046717A JP 2002205805 A JP2002205805 A JP 2002205805A JP 2002205805 A JP2002205805 A JP 2002205805A JP 2004046717 A JP2004046717 A JP 2004046717A
- Authority
- JP
- Japan
- Prior art keywords
- output
- log data
- logging
- setting information
- log
- 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
Links
Images
Landscapes
- Testing And Monitoring For Control Systems (AREA)
- Debugging And Monitoring (AREA)
Abstract
【課題】アプリケーションからのログデータの出力条件の設定を簡単に行うことができるロギング装置を提供する。
【解決手段】ロギング装置10は、出力判断部11、出力実行部12を含んでおり、アプリケーション20からのログ要求201を受けて、表示装置30あるいは外部記憶装置40にログデータ102を出力する。出力判断部11は、ログデータの種別に対応した出力設定情報、及びログデータの種別に依存しない共通の出力設定情報を参照し、ログ要求のログデータの種別に応じて、ログデータを出力の要否及び出力先を判断する。そして出力実行部12は、出力判断部11からの指示に基づき、表示装置30又は外部記憶装置40に、アプリケーションからのログデータを出力する。
【選択図】図1Provided is a logging device capable of easily setting output conditions of log data from an application.
A logging device includes an output determination unit and an output execution unit, and upon receiving a log request from an application, outputs a log data to a display device or an external storage device. The output determination unit 11 refers to output setting information corresponding to the type of log data and common output setting information that does not depend on the type of log data, and outputs log data according to the type of log data of the log request. The necessity and output destination are determined. Then, the output execution unit 12 outputs the log data from the application to the display device 30 or the external storage device 40 based on the instruction from the output determination unit 11.
[Selection diagram] Fig. 1
Description
【0001】
【発明の属する技術分野】
本発明は、アプリケーションプログラムの実行中のログデータを出力するロギング装置、ロギング方法、及びロギングプログラムに関する。
【0002】
【従来の技術】
アプリケーションの開発中や運用時には、内部の動作状況の確認を必要とする場合がある。内部の動作状況を確認する方法として、デバッガによるトレースを行う方法、プログラムの処理状況を示すログデータを出力する方法がある。このうち、ログデータの出力は、運用時等、デバッガでプログラムの実行を停止できない場合や、不定期現象の解析をする場合に有効である。
【0003】
このような課題を解決する他の手段として、特開2001−318809公報に記載されたロギング装置がある。上記ロギング装置は、アプリケーションがログデータを出力するときに、ログデータに、区分、データ長、日時、プロセス名、プログラム名の1つ以上を、キー属性として付与し、ロギング装置は、付与されたキー属性と管理テーブルの内容に応じてアプリケーションからのログデータの出力を制御するものである。管理テーブルには、キー属性に対応して、ログデータの出力の要否を示す情報、及び出力先ファイルに関する情報が記憶され、適宜設定可能となっているため、必要なログデータのみを指定したファイルに出力することができる。
【0004】
しかし、上記公報に記載されたロギング装置は、ロギング処理に先立って、アプリケーションからのログデータに付加される属性キーに対応する情報を情報管理テーブルに設定しておく必要があり、この設定作業は必ずしも簡単でない。すなわち、アプリケーションの運用時に、そのアプリケーションからのログデータに付加される属性キーを確認し、それぞれについて、ログデータの出力の要否情報と、出力する際の出力先情報を設定するのは、簡単でない。
【0005】
また、ログデータの出力の要否及び出力先を属性キーに対応して詳細に設定するのは、エラー発生時等の特別な場合であって、通常運用時は、最低限のログデータを、1つのファイルあるいは少数のファイルに、まとめて出力することで充分である。このような運用時にも、それぞれの属性キーに対応して管理テーブルを作成するのは、煩わしいものである。
【0006】
さらに、運用するアプリケーションによっては、ログデータに属性キーが付加されていないものもあり、そのようなアプリケーションのログデータを取得するためには、別なロギング装置を必要とする。
【0007】
【発明が解決しようとする課題】
本発明は、上記事情に鑑みなされたもので、アプリケーションからのログデータの出力条件の設定を簡単に行うことができるロギング装置、ロギング方法、及びロギングプログラムを提供することを目的とする。また、アプリケーションのログデータ処理機能に応じたロギングを可能とするロギング装置、ロギング方法、及びロギングプログラムを提供することを目的とする。
【0008】
【課題を解決するための手段】
本発明のロギング装置は、アプリケーションからのログ要求に基づくログデータを出力するものであって、ログデータの種別に対応した出力設定情報、及びログデータの種別に依存しない共通の出力設定情報を記憶した出力設定情報記憶部と、前記アプリケーションからのログデータの出力を制御する出力制御部とを有し、前記出力制御部は、前記ログ要求における前記種別に応じて、前記出力設定情報記憶部を参照し、前記ログ要求に基づくログデータを出力するものである。したがって、アプリケーションからのログデータの出力条件の設定を簡単に行うことができる。
【0009】
本発明のロギング装置における前記出力設定情報は、前記ログデータの出力の要否を示す出力要否情報と前記ログデータの出力先を示す出力先情報を含むものである。こうすると、ログの種別に応じて異なる出力先を設定できる。
【0010】
本発明のロギング装置における前記出力先情報は、前記ログデータが記憶されるファイル名の指定、及び表示手段の指定を含むものである。こうすると、ログの種別に応じて異なる出力先をさらに詳細に設定できる。
【0011】
本発明のロギング装置における前記出力設定部は、前記ログ要求から前記種別を特定できないときは、前記共通の出力設定情報を利用して前記ログデータを出力するものである。こうすると、ログの種別情報を出力できないアプリケーションのログの出力も可能となる。
【0012】
本発明のロギング装置における前記出力制御部は、前記ログ要求における前記種別に対応する出力設定情報を、前記出力設定情報記憶部から取得できないときは、前記共通の出力設定情報を利用して前記ログデータを出力するものである。こうすると、ログの出力設定情報の設定を必要なもののみ行うことで、運用が可能となる。
【0013】
本発明のロギング装置は、さらに、ログデータの出力処理自体の要否を示すロギング要否設定情報を記憶するロギング要否設定情報記憶部を有し、前記出力制御部は、前記ロギング要否設定情報が否のときは、前記ログ要求に基づくログデータの出力をすべて停止するものである。
【0014】
本発明のロギング方法は、アプリケーションのログデータを出力するものであって、アプリケーションからのログ要求を受信するログ要求受信ステップと、 前記ログ要求受信ステップで受信した前記ログ要求における、出力すべきログデータの種別を把握する種別把握ステップと、前記把握した種別に対応した出力設定情報を取得する出力設定情報取得ステップと、前記出力設定情報取得ステップで取得した前記出力設定情報に基づいて、前記ログ要求に基づくログデータの出力を制御するログデータ出力ステップとを含み、前記出力設定情報取得ステップは、前記ログデータの種別に対応した出力設定情報を取得できない場合には、ログデータの種別に依存しない共通の出力設定情報を、前記ログ要求に対応する出力設定情報とするものである。
【0015】
本発明のロギング方法における前記出力設定情報は、前記ログデータの出力の要否を示す出力要否情報と前記ログデータの出力先を示す出力先情報を含むものである。
【0016】
本発明のロギング方法における前記出力先情報は、前記ログデータが記憶されるファイル名の指定、及び表示手段の指定を含むものである。
【0017】
本発明のプログラムは、上記したロギング装置をコンピュータによって、実現するためのものである
【0018】
本発明のプログラムは、上記したロギング方法における各ステップを、コンピュータによって実行させるためのものである。
【0019】
【発明の実施の形態】
以下、本発明の実施の形態について、図面を用いて説明する。図1は、本発明の実施の形態のロギング装置の概略構成を示す図である。図1のロギング装置10は、出力判断部11、出力実行部12を含んでおり、アプリケーション20からのログ要求201を受けて、表示装置30あるいは外部記憶装置40にログデータ102を出力するものである。
【0020】
アプリケーション20は、チェックポイント等において、動作状況を示すログデータを出力するものであり、ロギング装置10に、ログデータの種別情報を付加したログ要求201を送信する。種別情報として、エラー情報、デバッグ情報等を用いることができるが、任意のものが設定可能である。
【0021】
ロギング装置10の出力判断部11は、ログ要求201を受信して、ログデータの出力の要否を判断するものである。すなわち、ロギング要否フラグ13の状態、ログ要求201に含まれるログデータの種別情報の内容と出力設定情報14の設定状態に基づいて、ログ要求201に含まれるログデータの出力の要否情報、出力先IDを取得する。そして、出力の必要がある場合は、受信したログデータと出力先IDを出力実行部12に送る。出力が不要である場合は、受信したログデータを破棄する。
【0022】
出力実行部12は、出力制御部11から送られる出力先IDに基づいて出力設定情報14を参照して出力先詳細情報を取得し、取得した出力先にログデータ101を送る。出力実行部12は、出力制御部11と共に出力制御部を構成する。
【0023】
ログデータの出力先としては、表示装置30と外部記憶装置40が設定可能であり、外部記憶相値40に出力する場合は、記憶すべきログファイル41が指定される。
【0024】
ロギング要否フラグ13は、ログデータの出力処理自体の要否を示す情報であり、このフラグがオンのときは、アプリケーションからのログ要求があっても、ログデータの出力をしないようにするためのものである。出力設定情報14は、ログデータの出力の要否を示す出力要否情報とログデータの出力先を示す出力先情報を示すもので、ログデータの種別に対応した出力設定情報と、ログデータの種別に依存しない共通の出力設定情報を含む。
【0025】
図2及び図3に、出力設定情報の一例を示す。図2は、ログデータの種別を示す種別キーに出力要否フラグと出力先IDを対応させた出力設定テーブル141の一例であり、図3は、出力先IDにファイル名、ファイル形式等を対応させた出力先詳細テーブル142の一例である。
【0026】
図2の例では、ログデータの種別に依存しない共通の出力設定情報に対応させた種別キー「0」と、任意に設定可能な種別キー「1」〜「5」とが、登録されている。種別キー「0」自体は、出力先ID「A」(「A」は、出力先が表示装置を示す。)と共にデフォルトで登録され、出力要否フラグ及び他の出力先IDは、任意に設定可能である。種別キー「0」以外の種別キーについては、出力要否フラグ及び出力先IDの登録が任意である。例えば、図2の例では、種別キー「4」のように、出力先IDを「未設定」(ブランクは未設定を示す。)であり、種別キー「5」は、出力要否フラグと出力先IDが共に「未設定」である。なお、図2の例では、出力先の数にかかわらず出力要否フラグを種別キーに対応させて設定しているが、種別キー毎出力先毎に出力要否フラグを設定するものとすることも可能である。
【0027】
出力先詳細テーブル142は、出力先として外部記憶装置40を設定する(「Bn」は、出力先が外部記憶装置を示す。)場合のファイルに関する情報を、出力先IDに対応させて記憶する。図3の例では、ファイルに関する情報として、「ファイル名」(単に、ファイル名だけでなく、パスも合わせて記憶してもよい。)、「ファイル形式」(「0」は追記型ファイル、「1」はリングバッファ型ファイルを示す。)、リングバッファ型ファイルに出力する場合の、ファイル桁数及びファイル行数が設定される。
【0028】
図2及び図3に示されるような出力設定情報14が設定され、ロギング要否フラグ13が「オン」に設定されている場合のロギング処理の一例を説明する。例えば、アプリケーションから、種別キー「1」をログデータのログ要求があると、ログ判断部11は、出力設定テーブル141を参照して、ログデータに出力先ID「B1」を付加して出力実行部12に送る。出力実行部12は、出力先テーブル142を参照して外部記憶装置40のファイル名「logfile1.txt」にログデータを記憶する。
【0029】
以上説明したように、出力設定情報14は、ロギング要否フラグ13がオンの場合にログ要求に基づくログデータを出力すべきかどうか、出力する場合どの出力先に出力するかを設定するものであるが、図2に示すように、すべての項目を完全に登録しなくてもよい。未設定の場合は、ログデータの種別に依存しない共通の出力設定情報に対応させた種別キー「0」に対応して登録された情報を利用して判断する。
【0030】
図1のロギング装置10において、ロギング要否フラグの設定及び出力設定情報の設定は、アプリケーション20からの設定指示202に基づき、設定情報管理部15が行う。設定処理は任意の時点で任意の方法(オペレータの設定、アプリケーション実行時の動的設定等)で行うことが可能である。また、設定項目を個別に設定することも、予め複数の設定項目を作成した設定ファイル42を読み込んでまとめて設定することも可能である。
【0031】
なお、所定のプログラムによってロギング装置を実現するためのコンピュータは、アプリケーションを実行するコンピュータと同じものでも異なるものでもよい。また、ログデータを出力する表示装置及び外部記憶装置も、アプリケーション用のものと兼用しても、別のものを用いてもよい。
【0032】
次に、図1のロギング装置のロギング動作を、図4の概略フロー図を用いて説明する。アプリケーション20からロギング要求201を受信すると、まず、ロギング要否フラグ13を参照し(ステップS401)、ロギングが必要化どうかを判断する(ステップS402)。そして、ロギング要否フラグ13がオフの場合は、ログ要求201に含まれるログデータを破棄して終了する。
【0033】
ロギング要否フラグ13がオフの場合は、出力設定情報14を参照し(ステップS403)、ログ要求に種別キーが含まれているかどうかを判断する(ステップS404)。種別キーが含まれている場合は、その種別キーが出力設定テーブルに登録されているかどうかを判断し(ステップS405)、登録されている場合は、出力要否フラグを参照し(ステップS406)、オフの場合は、ログデータを破棄して終了する。なお、出力要否フラグが未設定の場合は、オンと判断する。
【0034】
出力要否フラグがオンの場合は、種別キーに対応する出力先が設定されているか(出力先IDが登録されているか)を判断し(ステップS407)、設定されている場合は、設定出力先にログ要求201に基づくログデータを出力する(S408)。種別キーに対応する出力先が設定されていない場合は、共通出力の出力先(種別キー「0」の出力先)が設定されているかを判断し(ステップS409)、設定されている場合は、設定された出力先にログ要求201に基づくログデータを出力する(S410)。種別キー「0」の出力先が設定されていない場合は、表示装置30にログ要求201に基づくログデータを出力する(S411)。
【0035】
ステップS404で、ログ要求に種別キーが含まれていないと判断された場合、及びステップS405で、ログ要求に付加された種別キーが出力設定テーブルに登録されていない場合は、ステップS409に移行し、共通の出力設定情報に基づいて出力制御を行う。このような制御を行うと、出力設定情報が完全に設定されていない場合でも共通のデフォルト出力が行われることになり、出力設定情報の設定負担を軽減することができる。なお、この例では、種別キー「0」の出力要否フラグのオン/オフにかかわらずでも一律にデフォルト出力するものとしたが、種別キー「0」の出力要否フラグがオンの場合のみデフォルト出力するようにしてもよい。その場合は、ステップS409の前に、種別キー「0」の出力要否フラグを判断するステップを付加する。
【0036】
図1の説明から明らかなように、図4のフローは、ステップS408,S410、及びS411は、出力実行部12で行ない、他のステップは出力判断部11で行う。
【0037】
続いて、図1のロギング装置の設定動作を、図5の概略フロー図を用いて説明する。ステップS501では、ログデータの出力処理自体の要否の設定を判断し、要の場合はロギング要否フラグをオンに設定し(ステップS502)、不要の場合は、ロギング要否フラグをオフに設定する(ステップS503)。
【0038】
ステップS504では、種別キー毎の設定を判断し、種別キー毎の設定でない(共通の出力設定である)場合は、共通出力先の設定かどうかを判断する(ステップS505)。そして、共通出力先の設定の場合は、出力先情報(ファイル名、ファイル形式等)を設定する(ステップS506)。なお、この例では、共通の出力設定情報の出力要否フラグを常にオンとして扱っているが、オフ設定可能な場合は、ステップS505の前に出力要否フラグの設定を判断するステップを付加する。
【0039】
ステップS504で、種別キー毎の設定と判断された場合は、種別キー及び出力要否の設定を行ない(ステップS507)、さらにステップS508で出力先の設定を判断し、出力先設定の場合は、出力先情報を設定する(ステップS509)。
【0040】
ステップS507においては、まず、出力設定テーブル141から設定(変更、削除を含む。)したい種別キーを検索する。種別キーが出力設定テーブル141に登録済の場合は、その要否フラグの設定、出力先の設定を行う。種別キーが登録されていない場合は、新規に出力設定テーブル141に追加する。新規追加の場合は、一律出力要否フラグをオンに設定するようにしてもよい。ステップS509においては、出力先詳細テーブル142から設定したい出力先(ファイル名等)を検索する。出力先が出力先詳細テーブル142に登録済の場合は、その出力先IDを利用して出力設定テーブル141を設定する。また、出力先登録されていない場合は、新規に出力先IDを作成して出力先詳細テーブル142に追加し、作成した出力先IDを利用して出力設定テーブル141を更新する。
【0041】
このように設定した出力設定情報は、アプリケーションの状況毎にまとめて設定ファイル42として外部記憶装置40に記憶しておくと、同様の設定を行うときの設定動作が簡単になる。
【0042】
【発明の効果】
以上の説明から明らかなように、本発明によれば、アプリケーションからのログデータの出力条件の設定を簡単に行うことができる。また、アプリケーションのログデータ処理機能に応じたロギングが可能となる。
【図面の簡単な説明】
【図1】本発明の実施の形態のロギング装置の概略構成を示す図
【図2】本発明の実施の形態の出力設定テーブルの一例を示す図
【図3】本発明の実施の形態の出力先詳細テーブルの一例を示す図
【図4】本発明の実施の形態のロギング装置のロギング動作の概略フローを示す図
【図5】本発明の実施の形態のロギング装置の設定動作の概略フローを示す図
【符号の説明】
10・・・ロギング装置
11・・・出力判断部
12・・・出力実行部
13・・・ロギング要否設定フラグ
14・・・出力設定情報
141・・・出力設定テーブル
142・・・出力先詳細テーブル
15・・・設定情報管理部
20・・・アプリケーション
30・・・表示装置
40・・・外部記憶装置
41・・・ログファイル
42・・・設定ファイル[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a logging device that outputs log data during execution of an application program, a logging method, and a logging program.
[0002]
[Prior art]
During development or operation of an application, it may be necessary to check the internal operation status. As a method of checking the internal operation status, there are a method of performing tracing by a debugger and a method of outputting log data indicating the processing status of a program. Of these, the output of log data is effective when the execution of the program cannot be stopped by the debugger or when irregular phenomena are analyzed, such as during operation.
[0003]
As another means for solving such a problem, there is a logging device described in JP-A-2001-318809. When the application outputs log data, the logging device assigns, to the log data, one or more of a segment, a data length, a date and time, a process name, and a program name as key attributes. It controls output of log data from the application according to the key attributes and the contents of the management table. In the management table, information indicating the necessity of outputting log data and information about an output destination file are stored in correspondence with the key attribute, and can be appropriately set, so that only necessary log data is designated. Can be output to a file.
[0004]
However, the logging device described in the above publication needs to set information corresponding to an attribute key added to log data from an application in an information management table prior to a logging process. Not always easy. In other words, it is easy to check the attribute key added to the log data from the application when operating the application, and to set the necessity information of the log data output and the output destination information at the time of output for each of them. Not.
[0005]
In addition, the necessity of outputting log data and the output destination are set in detail corresponding to the attribute key in a special case such as when an error occurs.In normal operation, the minimum log data is set. It is sufficient to output them all together in one file or a small number of files. Even in such an operation, it is troublesome to create a management table corresponding to each attribute key.
[0006]
Further, depending on the application to be operated, an attribute key is not added to the log data, and another logging device is required to acquire the log data of such an application.
[0007]
[Problems to be solved by the invention]
The present invention has been made in view of the above circumstances, and has as its object to provide a logging device, a logging method, and a logging program that can easily set conditions for outputting log data from an application. It is another object of the present invention to provide a logging device, a logging method, and a logging program that enable logging according to a log data processing function of an application.
[0008]
[Means for Solving the Problems]
The logging device of the present invention outputs log data based on a log request from an application, and stores output setting information corresponding to the type of log data and common output setting information independent of the type of log data. Output setting information storage unit, and an output control unit that controls the output of log data from the application, the output control unit, according to the type in the log request, the output setting information storage unit And outputs log data based on the log request. Therefore, it is possible to easily set the log data output conditions from the application.
[0009]
The output setting information in the logging device of the present invention includes output necessity information indicating necessity of outputting the log data and output destination information indicating an output destination of the log data. In this way, different output destinations can be set according to the type of log.
[0010]
The output destination information in the logging device of the present invention includes designation of a file name in which the log data is stored and designation of a display unit. In this way, different output destinations can be set in more detail according to the type of log.
[0011]
The output setting unit in the logging device of the present invention outputs the log data using the common output setting information when the type cannot be specified from the log request. In this case, it is also possible to output a log of an application that cannot output log type information.
[0012]
The output control unit in the logging device of the present invention, when the output setting information corresponding to the type in the log request can not be acquired from the output setting information storage unit, the log using the common output setting information Outputs data. In this case, the operation can be performed by setting only the log output setting information that is necessary.
[0013]
The logging device of the present invention further includes a logging necessity setting information storage unit that stores logging necessity setting information indicating necessity of the log data output processing itself, and the output control unit performs the logging necessity setting. When there is no information, the output of the log data based on the log request is all stopped.
[0014]
The logging method of the present invention outputs log data of an application, and includes a log request receiving step of receiving a log request from an application, and a log to be output in the log request received in the log request receiving step. A type grasping step for grasping a type of data, an output setting information acquiring step for acquiring output setting information corresponding to the grasped type, and the log A log data output step of controlling output of log data based on the request, wherein the output setting information obtaining step depends on the type of log data when output setting information corresponding to the type of log data cannot be obtained. The common output setting information that is not used is output setting information corresponding to the log request. is there.
[0015]
The output setting information in the logging method of the present invention includes output necessity information indicating whether log data is required to be output and output destination information indicating an output destination of the log data.
[0016]
The output destination information in the logging method of the present invention includes designation of a file name in which the log data is stored and designation of a display unit.
[0017]
A program according to the present invention realizes the above-described logging device by a computer.
A program according to the present invention is for causing a computer to execute each step in the above-described logging method.
[0019]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a diagram illustrating a schematic configuration of a logging device according to an embodiment of the present invention. 1 includes an
[0020]
The application 20 outputs log data indicating an operation state at a checkpoint or the like, and transmits a
[0021]
The
[0022]
The
[0023]
As the output destination of the log data, the
[0024]
The
[0025]
2 and 3 show examples of the output setting information. FIG. 2 is an example of an output setting table 141 in which a type key indicating the type of log data is associated with an output necessity flag and an output destination ID, and FIG. 13 is an example of an output destination detailed table 142 that has been made.
[0026]
In the example of FIG. 2, a type key “0” corresponding to common output setting information that does not depend on the type of log data, and type keys “1” to “5” that can be arbitrarily set are registered. . The type key “0” itself is registered by default together with the output destination ID “A” (“A” indicates the display destination of the display device), and the output necessity flag and other output destination IDs are arbitrarily set. It is possible. For the type keys other than the type key “0”, the registration of the output necessity flag and the output destination ID is optional. For example, in the example of FIG. 2, the output destination ID is “unset” (blank indicates unset), like the type key “4”, and the type key “5” indicates the output necessity flag and the output necessity flag. The destination IDs are both “not set”. In the example of FIG. 2, the output necessity flag is set in association with the type key regardless of the number of output destinations. However, the output necessity flag is set for each type key and output destination. Is also possible.
[0027]
The output destination detailed table 142 stores information on a file when the
[0028]
An example of the logging process when the
[0029]
As described above, the
[0030]
In the
[0031]
The computer for realizing the logging device by the predetermined program may be the same as or different from the computer that executes the application. Also, the display device and the external storage device that output the log data may be shared with the application device, or may be different devices.
[0032]
Next, the logging operation of the logging device of FIG. 1 will be described with reference to the schematic flowchart of FIG. When the
[0033]
If the
[0034]
If the output necessity flag is on, it is determined whether an output destination corresponding to the type key has been set (whether an output destination ID has been registered) (step S407). Then, log data based on the
[0035]
If it is determined in step S404 that the type key is not included in the log request, and if the type key added to the log request is not registered in the output setting table in step S405, the process proceeds to step S409. The output control is performed based on the common output setting information. By performing such control, a common default output is performed even when the output setting information is not completely set, and the setting load of the output setting information can be reduced. In this example, default output is uniformly performed regardless of whether the output necessity flag of the type key “0” is on or off. However, the default is output only when the output necessity flag of the type key “0” is on. You may make it output. In this case, a step of determining the output necessity flag of the type key “0” is added before step S409.
[0036]
As is clear from the description of FIG. 1, in the flow of FIG. 4, steps S408, S410, and S411 are performed by the
[0037]
Next, the setting operation of the logging device of FIG. 1 will be described with reference to the schematic flowchart of FIG. In step S501, the setting of the necessity of the log data output processing itself is determined, and if necessary, the logging necessity flag is set to on (step S502). If not, the logging necessity flag is set to off. (Step S503).
[0038]
In step S504, the setting for each type key is determined. If the setting is not for each type key (common output setting), it is determined whether the setting is for a common output destination (step S505). Then, in the case of setting a common output destination, output destination information (file name, file format, etc.) is set (step S506). In this example, the output necessity flag of the common output setting information is always treated as on, but if it can be set off, a step of determining whether to set the output necessity flag is added before step S505. .
[0039]
If it is determined in step S504 that the setting is for each type key, the type key and output necessity are set (step S507), and the output destination is determined in step S508. Output destination information is set (step S509).
[0040]
In step S507, first, a type key to be set (including change and deletion) is searched from the output setting table 141. If the type key has been registered in the output setting table 141, the necessity flag is set and the output destination is set. If the type key is not registered, it is newly added to the output setting table 141. In the case of a new addition, the uniform output necessity flag may be set to ON. In step S509, the output destination (file name or the like) to be set is searched from the output destination detailed table 142. When the output destination is already registered in the output destination detailed table 142, the output setting table 141 is set using the output destination ID. If the output destination is not registered, a new output destination ID is created and added to the output destination detail table 142, and the output setting table 141 is updated using the created output destination ID.
[0041]
If the output setting information set in this way is stored together in the
[0042]
【The invention's effect】
As is apparent from the above description, according to the present invention, it is possible to easily set the log data output conditions from the application. Further, logging according to the log data processing function of the application can be performed.
[Brief description of the drawings]
FIG. 1 is a diagram illustrating a schematic configuration of a logging device according to an embodiment of the present invention; FIG. 2 is a diagram illustrating an example of an output setting table according to an embodiment of the present invention; FIG. 4 is a diagram illustrating an example of a destination detail table. FIG. 4 is a diagram illustrating a schematic flow of a logging operation of the logging device according to the embodiment of the present invention. FIG. 5 is a schematic flow of a setting operation of the logging device according to the embodiment of the present invention. Diagrams [Description of symbols]
Claims (11)
予め、ログデータの種別に対応した出力設定情報、及びログデータの種別に依存しない共通の出力設定情報を記憶した出力設定情報記憶部と、
前記アプリケーションからのログデータの出力を制御する出力制御部とを有し、
前記出力制御部は、前記ログ要求における前記種別に応じて、前記出力設定情報記憶部を参照し、前記ログ要求に基づくログデータを出力するものであるロギング装置。A logging device that outputs log data based on a log request from an application,
In advance, output setting information corresponding to the type of log data, and output setting information storage unit that stores common output setting information independent of the type of log data,
An output control unit that controls output of log data from the application,
The logging device, wherein the output control unit refers to the output setting information storage unit and outputs log data based on the log request according to the type in the log request.
前記出力設定情報は、前記ログデータの出力の要否を示す出力要否情報と前記ログデータの出力先を示す出力先情報を含むものであるロギング装置。The logging device according to claim 1,
A logging device, wherein the output setting information includes output necessity information indicating necessity of outputting the log data and output destination information indicating an output destination of the log data.
前記出力先情報は、前記ログデータが記憶されるファイル名の指定、及び表示手段の指定を含むものであるロギング装置。The logging device according to claim 2, wherein
The logging device, wherein the output destination information includes designation of a file name in which the log data is stored, and designation of a display unit.
前記出力制御部は、前記ロギング要否設定情報が否のときは、前記ログ要求に基づくログデータの出力をすべて停止するものであるロギング装置。The logging device according to any one of claims 1 to 5, further comprising: a logging necessity setting information storage unit that stores logging necessity setting information indicating necessity of log data output processing itself,
A logging device, wherein the output control unit stops outputting log data based on the log request when the logging necessity setting information is negative.
アプリケーションからのログ要求を受信するログ要求受信ステップと、
前記ログ要求受信ステップで受信した前記ログ要求における、出力すべきログデータの種別を把握する種別把握ステップと、
前記把握した種別に対応した出力設定情報を取得する出力設定情報取得ステップと、
前記出力設定情報取得ステップで取得した前記出力設定情報に基づいて、前記ログ要求に基づくログデータの出力を制御するログデータ出力ステップとを含み、
前記出力設定情報取得ステップは、前記ログデータの種別に対応した出力設定情報を取得できない場合には、ログデータの種別に依存しない共通の出力設定情報を、前記ログ要求に対応する出力設定情報とするものであるロギング方法。A logging method that outputs application log data,
A log request receiving step of receiving a log request from the application,
In the log request received in the log request receiving step, a type grasping step of grasping a type of log data to be output,
An output setting information acquisition step of acquiring output setting information corresponding to the grasped type,
A log data output step of controlling output of log data based on the log request, based on the output setting information obtained in the output setting information obtaining step,
The output setting information obtaining step includes, when output setting information corresponding to the type of the log data cannot be obtained, common output setting information independent of the type of the log data, and output setting information corresponding to the log request. The logging method that is what you do.
前記出力設定情報は、前記ログデータの出力の要否を示す出力要否情報と前記ログデータの出力先を示す出力先情報を含むものであるロギング方法。The logging method according to claim 7, wherein:
The logging method, wherein the output setting information includes output necessity information indicating necessity of outputting the log data and output destination information indicating an output destination of the log data.
前記出力先情報は、前記ログデータが記憶されるファイル名の指定、及び表示手段の指定を含むものであるロギング方法。The logging method according to claim 8, wherein
A logging method, wherein the output destination information includes designation of a file name in which the log data is stored and designation of a display unit.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2002205805A JP2004046717A (en) | 2002-07-15 | 2002-07-15 | Logging device, logging method, and logging program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2002205805A JP2004046717A (en) | 2002-07-15 | 2002-07-15 | Logging device, logging method, and logging program |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2004046717A true JP2004046717A (en) | 2004-02-12 |
Family
ID=31711008
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2002205805A Pending JP2004046717A (en) | 2002-07-15 | 2002-07-15 | Logging device, logging method, and logging program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2004046717A (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2009032125A (en) * | 2007-07-27 | 2009-02-12 | Fujitsu Component Ltd | Terminal emulator, and method for controlling the same |
| JP2012146271A (en) * | 2011-01-14 | 2012-08-02 | Nippon Telegr & Teleph Corp <Ntt> | Log management system, log management method, log management device, and log management program |
| JP2014149783A (en) * | 2013-02-04 | 2014-08-21 | Mitsubishi Electric Corp | Log output device and log output program |
-
2002
- 2002-07-15 JP JP2002205805A patent/JP2004046717A/en active Pending
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2009032125A (en) * | 2007-07-27 | 2009-02-12 | Fujitsu Component Ltd | Terminal emulator, and method for controlling the same |
| JP2012146271A (en) * | 2011-01-14 | 2012-08-02 | Nippon Telegr & Teleph Corp <Ntt> | Log management system, log management method, log management device, and log management program |
| JP2014149783A (en) * | 2013-02-04 | 2014-08-21 | Mitsubishi Electric Corp | Log output device and log output program |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN109241358A (en) | Metadata management method, device, computer equipment and storage medium | |
| CN110489391A (en) | A data processing method and related equipment | |
| US9013743B2 (en) | Data processing apparatus, data processing system, and computer-readable storage medium | |
| CN105718276A (en) | Method and device for providing APK download and NGINX server | |
| KR101482651B1 (en) | Service polling method and system, and computer storage medium | |
| US20130325534A1 (en) | Terminal management system, management server, and method therefor | |
| WO2019200808A1 (en) | Test case recommendation method, electronic device, and readable storage medium | |
| JP2004046717A (en) | Logging device, logging method, and logging program | |
| JP5884566B2 (en) | Batch processing system, progress confirmation device, progress confirmation method, and program | |
| US7523252B2 (en) | Data control apparatus functioning as a USB mass storage device | |
| JP2018526700A (en) | System and method for content storage and retrieval | |
| JP5911378B2 (en) | Document management server, computer program, and document management method | |
| JP2001306286A (en) | Print job management system and method on network | |
| WO2019061944A1 (en) | Data security-based method for updating medical software, and server | |
| JP4918797B2 (en) | File management program, file management apparatus, and file management method | |
| JP2015072531A (en) | Test support method, test support apparatus, and program | |
| CN112068974B (en) | Access control management method, device and medium | |
| JP5365251B2 (en) | File storage system | |
| JP2001084247A (en) | Link information management system | |
| JP4507609B2 (en) | File management program and file management apparatus | |
| JPWO2020100186A1 (en) | Information processing equipment, control methods, and programs | |
| WO2021157089A1 (en) | Network management device, method and program | |
| JP2018067218A (en) | Application development support apparatus and application development support method | |
| JPH03290741A (en) | Error logging method | |
| JP2006092022A (en) | Computer program for data management, data management device, and access control method thereof |