JP4767389B2 - Logging device and recording medium - Google Patents
Logging device and recording medium Download PDFInfo
- Publication number
- JP4767389B2 JP4767389B2 JP2000137397A JP2000137397A JP4767389B2 JP 4767389 B2 JP4767389 B2 JP 4767389B2 JP 2000137397 A JP2000137397 A JP 2000137397A JP 2000137397 A JP2000137397 A JP 2000137397A JP 4767389 B2 JP4767389 B2 JP 4767389B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- logging
- category
- file
- storage location
- 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.)
- Expired - Lifetime
Links
- 230000006870 function Effects 0.000 claims description 33
- 238000000034 method Methods 0.000 claims description 30
- 238000012545 processing Methods 0.000 claims description 9
- 238000013500 data storage Methods 0.000 claims 4
- 238000007726 management method Methods 0.000 claims 2
- 239000000872 buffer Substances 0.000 description 20
- 238000010586 diagram Methods 0.000 description 10
- 238000007781 pre-processing Methods 0.000 description 4
- 230000001174 ascending effect Effects 0.000 description 3
- 239000000284 extract Substances 0.000 description 3
- 238000012360 testing method Methods 0.000 description 3
- 238000000605 extraction Methods 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 238000005070 sampling Methods 0.000 description 2
- 238000013480 data collection Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000011835 investigation Methods 0.000 description 1
- 238000002955 isolation Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 230000014759 maintenance of location Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
Images
Landscapes
- Debugging And Monitoring (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、アプリケーションプログラムの実行中のチェックポイントのデータをリアルタイムにロギングするロギング装置および記録媒体に関するものである。
【0002】
【従来の技術】
パソコンなどの計算機を用いてオンラインでネットワークを介してサーバに接続し各種サービスの提供(例えば商品の購入等のサービスの提供)を行う、いわゆるビジネスアプリケーションが多くなっている。このビジネスアプリケーションのデバッグや動作監視は、当該アプリケーションのチェックポイントのデータをオンラインでトレースして保存し、チェックする機能が必要となっている。このオンラインでトレースしてデータを保存するには、現状では、オフラインのデバッグ環境下ではトレースしてデータを保存することは可能であるが、オンラインでアプリケーションが動作している最中にリアルタイムでデータをトレースすることができず、メッセージとしてテキストファイルに書き出して保存するようにしていた。
【0003】
【発明が解決しようとする課題】
このため、オンラインで動作中のアプリケーションのチェックポイントのデータをメッセージとしてテキストファイルに書き出していたため、ファイルが無尽蔵に増えてしまうという問題があった。また、ファイル中から所望のチェックポイントのデータのみを検索して抽出することが大変であるという問題もあった。更に、ファイルに無尽蔵にメッセージが書き出されてしまうため、不要なメッセージを削除するプログラムを作成する必要が生じてしまうという問題もあった。
【0004】
本発明は、これらの問題を解決するため、アプリケーション中にロギング関数を組み込み、パラメタで区分、採取条件を必要に応じて設定し、必要なデータのみをメモリに保存し、検索時に区分、検索条件を指定して必要なデータのみを整理して出力し、必要なデータのみを採取すると共に、必要なデータのみを検索して出力することを目的としている。
【0005】
【課題を解決するための手段】
図1を参照して課題を解決するための手段を説明する。
図1において、アプリケーション1は、各種業務処理を行うアプリケーションプログラムであって、ここでは、オンライン業務処理を行い、ロギング関数2を組み込んだものである。
【0006】
ロギング関数2は、アプリケーション1中に組み込まれ、チェックポイントのデータがパラメタで指定された区分およびロギング条件に合致するときに出力したりなどするものである。
【0007】
キャッシュバッファ6は、データを格納するものである。
検索表示手段13は、区分、検索条件に合致したデータを検索したりなどするものである。
【0008】
書式定義ファイル15は、検索したデータを配置して出力する書式を定義したものである。
次に、動作を説明する。
【0009】
アプリケーション1の実行中にロギング関数2が実行されると、ロギング関数2がチェックポイントのデータについてパラメタで指定された区分あるいは区分とロギング条件に合致するときにメモリに格納して保存するようにしている。
【0010】
この際、ロギング関数2がデータを出力するときに、データに区分、データ長、日時、プロセス名、プログラム名の1つ以上をキー属性として付与するようにしている。
【0011】
また、検索表示手段13がメモリ中のキー属性を検索し、指定された区分あるいは区分と検索条件に合致するデータを抽出し、抽出したデータについて予め作成した書式定義ファイル15の定義に従ってデータを配置して出力するようにしている。
【0012】
また、検索表示手段13がアプリケーション1を実行する計算機システムをネットワークを介して接続し各メモリ中のキー属性を検索し、指定された区分あるいは区分と検索条件に合致するデータを抽出するようにしている。
【0013】
また、ロギング条件あるいは検索条件として、アプリケーション1の工程とするようにしている。
従って、アプリケーション1中にロギング関数2を組み込み、パラメタで区分、採取条件を必要に応じて設定し、必要なデータのみをメモリに保存し、検索時に区分、検索条件を指定して必要なデータのみを整理して出力することにより、必要なデータのみを採取すると共に、必要なデータのみを検索して出力することが可能となる。
【0014】
【発明の実施の形態】
次に、図1から図11を用いて本発明の実施の形態および動作を順次詳細に説明する。
【0015】
図1は、本発明のシステム構成図を示す。
図1において、アプリケーション1は、各種業務処理を行うアプリケーションプログラムであって、ここでは、オンライン業務処理を行い、パラメタに従いチェックポイントのデータをロギングするロギング関数2を組み込んだものである。
【0016】
ロギング関数2は、アプリケーション1中に組み込まれ、チェックポイントのデータがパラメタで指定された区分あるいは区分とロギング条件に合致するときに出力し、合致しないときに出力しないようにしたりなどするものである。
【0017】
パラメタ3は、ロギング関数2が参照して当該パラメタ3で指定された区分あるいは区分とロギング条件に合致したときにチェックポイントのデータをキャッシュバッファ6に出力させ、無用なデータの出力を抑止するためのものである。パラメタ3としては、
などがある。これらパラメタ3で指定れた区分あるいは区分とロギング条件に合致するチェックポイントのデータに、これらをキー属性として付加し、検索し易くしておく。
【0018】
ソフトSW盤4は、抽出したデータをいずれのキャッシュバッファ6に書き込むかを切り換えたり、データを抽出しないときはOFFにしてデータをキャッシュバッファ6に書き込まないように切り換えたりなどするものである。
【0019】
キャッシュバッファ6は、抽出したデータを一時的に格納する高速アクセス可能なメモリであって、ここでは、2つ設けて1つが一杯になると他の空きの1つに切り換え、この間に一杯のキャッシュバッファ6から低速アクセスのロギングファイル12に格納するためのものである。
【0020】
ロギング抽出手段7は、一杯になったときあるいはロギング指示されたときなどに、キャッシュバッファ6内のデータをロギングファイル12に格納するものである。
【0021】
管理テーブル8は、キャッシュバッファ6から取り出したデータに付加されているキー属性をもとに、いずれのロギングファイル12に格納するかの情報を設定したものであって、ここでは、
・大区分毎のロギングフラグ:
・大区分毎のロギングファイル番号:
・その他:
を設定するものである(図3を用いて後述する)。
【0022】
設定変更画面9は、画面上から管理者が管理テーブル8を変更するための画面であって、管理テーブル8の内容を必要に応じて変更するためのものである。
ソフトSW盤10は、管理テーブル8を参照し、ロギング抽出手段7によってキャッシュバッファ6から取り出したデータについて当該データに付加されているキー属性に従い、切り換えて該当するロギングファイル1に格納するためのものである。
【0023】
ロギングファイル12は、管理テーブル8に従って切り換えられた(分類された)データを格納するファイルである(図3を用いて後述する)。
検索表示手段13は、指定された区分あるいは区分と検索条件に従い、該当するロギングファイル12から取り出したデータのうち該当するものを検索し、書式定義ファイル15に従い書式に設定して表示したり、印字したりするものである。
【0024】
書式定義ファイル15は、表示あるいは印字するときにデータの配置を定義しファイルである。
ロギング印字16は、書式定義ファイル15に従い、区分あるいは区分と検索条件に合致したデータを配置して印字したものである。尚、書式定義ファイル15に区分が合致するものが無い場合は、標準の標準の所定形式で印字する。
【0025】
図2は、本発明の説明図を示す。
図2の(a)は、ロギング/検索の例を示す。
図2の(a−1)は、ロギングファイルのデータ構造例を示す。ロギングファイル12は、図示の下記のキー属性およびデータを格納したものである。
【0026】
図2の(a−2)は、検索キーの例を示す。検索キー21として、図示の下記の情報を設定し、合致するデータを検出するためのものである。
【0027】
・開始時刻2000年4月17日 12時0分0秒(通算10090msとする)
・終了時刻2000年4月17日 13時0分0秒(通算10250msとする)
・開始大区分001
・終了大区分002
ここで、開始大区分001、終了大区分002は、開始大区分001の小区分の全部(例えば0から255)および終了大区分002の小区分(例えば0から255)の範囲内を表す、
キー検索手段22は、検索キー21で指定された範囲に合致する、データに付加されているキー属性をもつものを検索して取り出し、印字などするものである。ロギングファイル12の第1段目のデータは点線の×印の採取時間(通算10000)が検索キーの通算時間内になく対象外となる。また、第4段目のデータは点線の×印の大区分コード010が大区分範囲(001から002)内になく対象外となる。他の2つのデータは、対象となり、書式定義ファイル15に従い書式に配置して印字する。
【0028】
以上のように、検索キー21として区分あるいは区分と検索条件(ここでは、開始時間と終了時間)を指定することで、自動的に該当するデータを検索して表示などすることが可能となる。
【0029】
図2の(b)は、表示例を示す。
図2の(b−1)は、書式定義ファイル15の例を示す。ここでは、図示の下記のように、情報とその配置を定義したものである。
【0030】
・大区分コード:
・小区分コード:
・データ書式(可変サイズ):
図2の(b−2)は、表示する様子を示す。ここでは、検索表示手段13が、図2の(b−1)の書式定義ファイル15に従い、図2の(a−2)の検索キーに合致するデータとして検索したデータを書式に配置して表示イメージ23のように表示する。
【0031】
以上のように、書式定義ファイル15を予め定義することで、ロギングファイル12から検索キーに合致するデータを取り出して当該書式定義ファイル15の書式に配置して表示イメージ23に示すように自動的に見易い書式に設定して表示することが可能となる。
【0032】
図3は、本発明の説明図(管理テーブル)を示す。ここでは、左側の管理テーブル8に、
・大区分コード:ロギング対象の大区分
・ロギングフラグ:ONはロギングする、OFFはロギングしない
・ファイルNO:ロギングするデータを格納するファイルNO
を設定する。また、右側の管理テーブル8に、
・ファイルNO:左側の管理テーブル8に設定したファイルNO
・フルパス名:ファイルNOへのフルパス名
を設定する。
【0033】
以上のように管理テーブル8に設定することで、チェックポイントのデータが、大区分コードと合致し、かつロギングフラグがONと設定されていたときに、ファイルNOのフルパス名で指定されたファイル(ロギングファイル)にデータを格納することが可能となる。これにより、ロギングフラグをONあるいはOFFに切り換えることでデータをロギングする、ロギングしないを簡易に切り換えることが可能となると共に、フルパス名を変更することでデータを格納するファイルの場所を簡易に自動変更することが可能となる。
【0034】
図4は、本発明の動作説明フローチャート(前処理)を示す。
図4において、S1は、ロギングに付与しているコードの体系を決め、区分定義情報を作成する。これは、例えばデータにキー属性として大区分コード(0−255)、小区分コード(0−255)、プロセス名、プログラム名を付与する。キー属性は、ここでは、以下のような用途で使用する。
【0035】
・大区分:データの用途別に採番
・小区分:大区分の中の詳細分類として採番
・プロセス名:実行されるアプリケーションモジュールの名称
・プログラム名:所属するサブルーチン名
例えば
・全アプリケーション毎のレスポンスを計測
・大区分001、小区分001を各アプリケーションの入口に定義
・大区分001、小区分002を各アプリケーションの出口に定義
とすると、プロセス名Aのレスポンスは、例えば以下のように求められる。
【0036】
・プロセス名Aの大区分001、小区分002−大区分002、小区分001
S2は、ロギング管理テーブルの設定を図示の下記のように行う。
【0037】
・ロギングの保存期間より容量を設定:
・ロギングデータの書式の設定(書式定義ファイル15):
・工程合わせた大区分毎の重要度の設定(図10参照):
・大区分に対しての採取要否を必要な時に変更(図3のロギングフラグ):
・大区分に対しての格納先を必要な時に変更(図2のフルパス名):
・表示するためのアプリケーションツールの設定(例えばWORD(登録商標)):
・その他:
S3は、アプリケーションのソースコードにロギング関数を組み込む、およびパラメタを設定する。これは、図1のアプリケーション1中に図示のように、ロギング関数2を組み込む、およびパラメタを設定(パラメタは必要なときに変更可)する。
【0038】
以上によって、区分定義情報およびロギング管理テーブル8を設定、およびロギング関数2をアプリケーション1中に組み込み、パラメタを設定し、ロギングのための前処理が完了したこととなる。
【0039】
図5は、本発明の動作説明フローチャート(運用)を示す。
図5において、S11は、アプリケーションの実行を行う。これは、既述した図4で前処理した後の図1のアプリケーション1の実行を行う。
【0040】
S12は、ロギング関数が実行されたか判別する。YESの場合には、S13に進む。NOの場合には、S11に戻り繰り返す。
S13は、大区分に対する採取要か判別する。これは、S12のYESでロギング関数が実行されたときに、そのチェックポイントのデータについてパラメタで指定された区分あるいは区分と採取条件に合致して採取要か判別する。YESの場合には、S14に進む。一方,NOの場合には、S11に戻り繰り返す。
【0041】
S14は、S12のYESおよびS13のYESでロギング関数が実行され、かつチェックポイントのデータについて採取要と判明したので、ロギングデータを対象のキャッシュバッファ6に格納する。
【0042】
S15は、キャッシュバッファが満杯か判別する。YESの場合には、S16に進む。NOの場合には、S11に戻り繰り返す。
S16は、S15のYESでキャッシュバッファ6が満杯と判明したので、他の空きのキャッシュバッファ6に切り替える。
【0043】
S17は、大区分に対するロギングファイルへロギングデータを格納する。これは、既述した図3の管理テーブル8を参照して該当大区分コードのロギングフラグがONのときに、フルパス名で示されるファイルに、ロギングデータを格納する(OFFのときは、格納しない)。
【0044】
以上によって、アプリケーション1の実行時に組み込まれたロギング関数2が実行されると、当該ロギング関数2がチェックポイントのデータについてパラメタを参照してロギング要と判明したときにキャッシュバッファに格納し、キャッシュバッファが満杯となったときに管理テーブルを参照してロギングフラグがONのときに該当ロギングファイルに格納することが可能となる。これにより、アプリケーション1の該当チェックポイントのデータについてパラメタで指定された区分あるいは区分と採取条件に合致したときにキャッシュバッファに格納し、更に、管理テーブル8を参照して該当ロギングファイルに格納したり、ロギングフラグをOFFに設定されていたときは該当ロギングファイルに格納しないで破棄したり、更に、ロギングファイルへのフルパス名を任意に変更することで格納先を簡易に変更したりすることが可能となる。
【0045】
図6は、本発明の説明図(ロギングファイル設定)を示す。これは、運用時に、ロギングデータを、当該ロギングデータの大区分に従い格納するロギングファイルを設定する画面の例を示す。例えば図中の▲1▼は、図3で説明したロギングデータを格納するための情報である
・ファイル番号:ファイル0
・フルパス:C:¥Program Files¥DLOG¥Data¥logfil0
・バッファサイズ:1
・バッファエントリ数:1024
・区分:大区分
を設定するものである。大区分については、更に、右下のウィンドウに大区分を表示してそのうちから図示のようにチェックして選択して設定し、選択した大区分のロギングデータを当該ファイル0に格納するものである。同様に、ファイル1からファイル3についても設定する。
【0046】
以上のように、大区分毎にロギングデータを格納するファイル番号およびその格納場所を表すフルパス名を設定することにより、既述した図5の運用時のS17でロギングデータの大区分に従ったロギングファイルに格納することが可能となる。
【0047】
図7は、本発明の動作説明フローチャート(検索)を示す。
図7において、S21は、区分と検索条件(時刻範囲など)を指定する。例えば後述する図8の
・▲2▼の区分:大区分000の小区分000から大区分255の小区分255
・▲3▼の検索条件(時刻範囲):2000年03月29日10時34分28秒から2000年03月31日11時34分28秒で昇順
と指定する。
【0048】
S22は、大区分に対応したロギングファイルを対象とする。これは、S21で指定された大区分に対応したロギングファイルを、検索対象と設定する。これにより、ロギング時に大区分で仕分けてして該当ロギングファイルにロギングデータが格納されているため、検索時に指定された大区分に対応するロギングファイルを検索対象にすればよく、従来の全ロギングファイルを検索対象にする必要がない。
【0049】
S23は、時刻範囲の中で指定された大区分のレコードを抽出する。これは、S22で検索対象としたロギングファイル中から、S21で指定された検索条件である時刻範囲を持つレコードのうち検索対象となる大区分のレコードを抽出する。
【0050】
S24は、大区分に対応した書式が設定されているか判別する。これは、S23で抽出したレコードの大区分に対応する書式定義ファイル15が設定されているか判別する。YESの場合には、設定されていたその大区分の書式定義ファイル15を参照し、S25でロギングデータを当該書式に従って変換し、S26に進む。一方、S24のNOの場合には、S26に進む。
【0051】
S26は、指定された表示アプリケーションツールで表示する。
以上によって、区分と検索条件を指定することで、指定した大区分のロギングファイルから検索条件(例えば時刻範囲)に合致するレコードのうち指定した区分に合致するレコードを抽出し、当該大区分の書式定義ファイル15が定義されているときは当該書式に従い変換した後に、表示アプリケーションツールに渡して表示することが可能となる。
【0052】
図8は、本発明の説明図(区分、検索条件)を示す。これは、既述した図7のS21で区分と検索条件(ここでは、時刻範囲)を指定する画面の例を示す。図中の▲2▼と▲3▼の部分で図示の下記の大区分範囲と検索条件(時刻)を指定する。
【0053】
▲2▼:検索する区分範囲として、
・大区分000の小区分000から大区分255の小区分255を指定する。
【0054】
▲3▼:検索条件である時刻範囲として、
・2000年03月29日10時34分28行から2000年03月31日11時34分28秒までの範囲でかつ昇順と指定する。
【0055】
以上のように、画面上から区分範囲および検索条件(ここでは、時刻範囲と昇順/降順)を指定し、既述した図7のS22からS26によって検索して検索結果を簡易に表示させることが可能となる。
【0056】
図9は、本発明の動作説明フローチャート(リンク)を示す。これは、図1の構成を持つパソコンを、ネットワークを介して複数接続し、各パソコンのロギングファイル12を共有ファイルとして設定し相互に参照可能とし、例えばオンラインで、あるパソコンから他のパソコンにアクセスしてオンライン業務を実行するときの業務アプリケーションのリアルタイムにチェックポイントにおけるデータの変化をチェックしたり、検証したりし、トラブルの調査、解析、障害の切り分けなどを行うときに使用するためのものである。
【0057】
図9において、S31は、ロギングファイルを共有ファイルに設定する。これは、図1の構成のパソコンを、複数台をネットワークを介して接続し、それぞれのパソコンのロギングファイル12を共有ファイルに設定し、いずれのパソコンからも全てのロギングファイル12の参照を可能にして、オンラインで各パソコンがデータをやり取りしてオンライン業務処理を行うときの動作をチェックなどすることが可能となる。
【0058】
図10は、本発明の工程管理テーブル例を示す。この工程管理テーブルは、オンライン業務を行うアプリケーションプログラムについて、大区分毎に工程単位にロギングデータを採取するか否かの情報(重要であれば採取、重要でなければ採取しない)を設定したものである。この工程管理テーブルに設定された重要度情報に従い、アプリケーションプログラムの工程(図示では、単体テストPT、結合テストIT、システムテストST、運用/メンテなどの工程)毎にロギングデータを採取○、採取しない×の設定に従い、工程で重要なロギングデータのみを自動的に採取し、無用なロギングデータの採取を無くして効率的なロギングデータの採取を実現することが可能となる。
【0059】
図11は、本発明の説明図(結果)を示す。これは、書式定義ファイル15で指定された書式に従い、指定されたソフト(ここでは、EXCEL(登録商標))で表を作成してロギングデータを配置して▲4▼結果画面のように表示したものである。▲4▼結果画面には、ロギングデータを採取したアプリ名、プログラム名、プロセス名、大区分/小区分、年月日時分秒などを表示したものである。
【0060】
以上のように、書式定義ファイル15および表示アプリを指定することで、自動的にロギングデータを見易く表示することが可能となる。
(付記1) アプリケーションプログラムの実行中のチェックポイントのデータをリアルタイムにロギングするロギング装置において、
アプリケーションプログラム中に組み込まれ、実行されるとチェックポイントのデータがパラメタで指定された区分あるいは区分とロギング条件に合致するときに出力するロギング関数と、
上記ロギング関数が出力したデータを保存するメモリと
を備えたことを特徴とするロギング装置。
(付記2)上記ロギング関数がデータを出力するときに、当該データに区分、データ長、日時、プロセス名、プログラム名の1つ以上をキー属性として付与したことを特徴とする請求項1記載のロギング装置。
【0061】
(付記3) アプリケーションプログラムの実行中のチェックポイントのデータをリアルタイムにロギングするロギング装置において、
アプリケーションプログラムのチェックポイントのデータに区分、データ長、日時、プロセス名、プログラム名の1つ以上をキー属性として付与して格納するメモリと、
上記メモリ中のキー属性を検索し、指定された区分あるいは区分と検索条件に合致するデータを抽出する手段と、
上記抽出したデータについて、予め作成した書式定義ファイルの定義に従って当該データを配置して出力する手段と
を備えたことを特徴とするロギング装置。
(付記4) 上記アプリケーションプログラムを実行する計算機システムをネットワークを介して接続し上記各メモリ中のキー属性を検索し、指定された区分あるいは区分と検索条件に合致するデータを抽出することを特徴とする請求項3記載のロギング装置。
(付記5) 上記ロギング条件あるいは検索条件として、上記アプリケーションプログラムの工程としたをことを特徴とする請求項1から請求項4のいずれかに記載のロギング装置。
(付記6) アプリケーションプログラム中に組み込まれ、実行されるとチェックポイントのデータがパラメタで指定された区分あるいは区分とロギング条件に合致するときに出力するロギング関数と、
上記ロギング関数が出力したデータをメモリに保存する手段と
して機能させるプログラムを記録したコンピュータ読取可能な記録媒体。
(付記7) アプリケーションプログラムのチェックポイントのデータに区分、データ長、日時、プロセス名、プログラム名の1つ以上をキー属性として付与してメモリに格納する手段と、
上記メモリ中のキー属性を検索し、指定された区分あるいは区分と検索条件に合致するデータを抽出する手段と、
上記抽出したデータについて、予め作成した書式定義ファイルの定義に従って当該データを配置して出力する手段と
して機能させるプログラムを記録したコンピュータ読取可能な記録媒体。
【0062】
【発明の効果】
以上説明したように、本発明によれば、アプリケーションプログラム中にロギング関数を組み込み、パラメタで区分あるいは区分と採取条件を必要に応じて設定し、必要なデータのみをメモリに保存し、検索時に区分あるいは区分と検索条件を指定して必要なデータのみを整理して出力する構成を採用しているため、オンラインで動作するアプリケーションプログラムのチェックポイントのデータのうち必要なデータのみを採取すると共に、更に、必要なデータのみを検索して出力することが可能となる。これにより、
(1) ロギングデータを区分コードで管理し、区分単位で採取の可否を必要に応じて簡易に指定できる。
【0063】
(2) ロギングデータを区分に対応づけたロギングファイルに格納することにより、検索時に選別や管理を簡易かつ迅速に行うことができ、しかも、必要なときに必要なデータをピンポイントで取り出すことができる。
【0064】
(3) 区分毎の書式を書式定義ファイル15に定義することにより、データの区分を指定することで、書式を指定でき、ロギングデータを見易く書式に設定して表示/印字できる。
【0065】
(4) ロギングデータにキー属性(区分、採取時間、プログラム名、プロセス名などの情報)を付加して保存することにより、キー属性を指定して簡易、迅速に所望のロギングデータを抽出して書式に設定して表示/印字できる。
【図面の簡単な説明】
【図1】本発明のシステム構成図である。
【図2】本発明の説明図である。
【図3】本発明の説明図(管理テーブル)である。
【図4】本発明の動作説明フローチャート(前処理)である。
【図5】本発明の動作説明フローチャート(運用)である。
【図6】本発明の説明図(ロギングファイル)である。
【図7】本発明の動作説明フローチャート(検索)である。
【図8】本発明の説明頭(区分、検索条件)である。
【図9】本発明の動作説明フローチャート(リンク)である。
【図10】本発明の工程管理テーブル例である。
【図11】本発明の説明頭(結果)である。
【符号の説明】
1:アプリケーション(アプリケーションプログラム)
2:ロギング関数
3:パラメタ
4、10:ソフトSW盤
6:キャッシュバッファ
7:ロギング検出手段
8:管理テーブル
12:ロギングファイル
13:検索表示手段
15:書式定義ファイル[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a logging device and a recording medium for logging checkpoint data during execution of an application program in real time.
[0002]
[Prior art]
There are many so-called business applications that connect to a server online via a network using a computer such as a personal computer and provide various services (for example, provision of services such as purchase of goods). The debugging and operation monitoring of this business application requires a function for tracing, saving, and checking checkpoint data of the application online. In order to save data by tracing online, it is currently possible to save data by tracing in an offline debugging environment. However, data can be saved in real time while the application is running online. Could not be traced, and was written and saved as a message in a text file.
[0003]
[Problems to be solved by the invention]
For this reason, since checkpoint data of an application running online is written as a message to a text file, there is a problem that the number of files increases inexhaustibly. In addition, there is a problem that it is difficult to search and extract only desired checkpoint data from the file. Furthermore, since messages are written indefinitely in the file, there is a problem that it becomes necessary to create a program for deleting unnecessary messages.
[0004]
In order to solve these problems, the present invention incorporates a logging function in an application, sets classification and collection conditions as necessary with parameters, stores only necessary data in a memory, and classifies and search conditions when searching. It is intended to organize and output only necessary data by specifying the, collect only necessary data, and search and output only necessary data.
[0005]
[Means for Solving the Problems]
Means for solving the problem will be described with reference to FIG.
In FIG. 1, an
[0006]
The
[0007]
The
The search display means 13 searches for data that matches the category and search conditions.
[0008]
The
Next, the operation will be described.
[0009]
When
[0010]
At this time, when the
[0011]
Further, the search display means 13 searches the key attribute in the memory, extracts the data that matches the specified category or category and the search condition, and arranges the data according to the definition of the
[0012]
Further, the search display means 13 connects a computer system that executes the
[0013]
Further, the process of the
Therefore, the
[0014]
DETAILED DESCRIPTION OF THE INVENTION
Next, embodiments and operations of the present invention will be described in detail sequentially with reference to FIGS.
[0015]
FIG. 1 shows a system configuration diagram of the present invention.
In FIG. 1, an
[0016]
The
[0017]
and so on. These are added as key attributes to the data specified at the
[0018]
The
[0019]
The
[0020]
The logging extraction means 7 stores the data in the
[0021]
The management table 8 sets information on which
-Logging flag for each major category:
-Logging file number for each major category:
・ Other:
(Which will be described later with reference to FIG. 3).
[0022]
The setting
The
[0023]
The
The search display means 13 searches for the corresponding data out of the
[0024]
The
The
[0025]
FIG. 2 is an explanatory diagram of the present invention.
FIG. 2A shows an example of logging / search.
(A-1) in FIG. 2 shows an example of the data structure of the logging file. The
[0026]
FIG. 2A-2 shows an example of a search key. The following information shown in the figure is set as the
[0027]
・ Starting time April 17, 2000 12:00:00 (10090 ms in total)
・ End time April 17, 2000 13:00:00 (10250ms in total)
・ Start
・ End
Here, the start
The key retrieval means 22 retrieves, retrieves, prints, and the like those having key attributes added to the data that match the range specified by the
[0028]
As described above, by designating a category or category and a search condition (here, start time and end time) as the
[0029]
FIG. 2B shows a display example.
(B-1) in FIG. 2 shows an example of the
[0030]
・ Category code:
・ Subdivision code:
-Data format (variable size):
(B-2) of FIG. 2 shows a state of display. Here, in accordance with the
[0031]
As described above, by defining the
[0032]
FIG. 3 is an explanatory diagram (management table) of the present invention. Here, in the management table 8 on the left side,
-Major category code: Major category for logging
-Logging flag: Logs when ON, does not log when OFF
-File NO: File NO for storing data to be logged
Set. In the management table 8 on the right side,
-File No: File No. set in the management table 8 on the left side
Full path name: Full path name to file NO
Set.
[0033]
By setting in the management table 8 as described above, when the checkpoint data matches the major classification code and the logging flag is set to ON, the file (with the full path name of the file NO ( Data can be stored in a logging file. This makes it possible to easily switch between logging and not logging by switching the logging flag to ON or OFF, and easily changing the file location for storing data by changing the full path name. It becomes possible to do.
[0034]
FIG. 4 shows an operation explanatory flowchart (pre-processing) of the present invention.
In FIG. 4, S1 determines the system of codes assigned to logging and creates category definition information. For example, a major classification code (0-255), a minor classification code (0-255), a process name, and a program name are given to the data as key attributes. Here, the key attribute is used for the following purposes.
[0035]
・ Category: Numbering by data usage
・ Small category: Numbering as detailed category in major category
-Process name: Name of the application module to be executed
-Program name: Subroutine name to which it belongs
For example
・ Measure responses for all applications
・ Define
-Define
Then, the response of the process name A is obtained as follows, for example.
[0036]
Process name A
In S2, the logging management table is set as shown below.
[0037]
-Set the capacity from the logging retention period:
Logging data format setting (format definition file 15):
・ Set the importance level for each major category (see Figure 10):
・ Changes whether or not to collect for large categories when necessary (logging flag in Fig. 3):
-Change the storage location for major categories when necessary (full path name in Fig. 2):
Application tool setting for display (for example, WORD (registered trademark)):
・ Other:
In step S3, a logging function is incorporated in the source code of the application and a parameter is set. This incorporates logging
[0038]
As described above, the category definition information and the logging management table 8 are set, the
[0039]
FIG. 5 shows an operation explanation flowchart (operation) of the present invention.
In FIG. 5, S11 executes an application. This executes the
[0040]
In step S12, it is determined whether the logging function has been executed. If YES, the process proceeds to S13. If NO, return to S11 and repeat.
In step S13, it is determined whether it is necessary to collect a large category. When the logging function is executed in YES in S12, it is determined whether or not the checkpoint data needs to be collected in accordance with the classification specified by the parameter or the classification and collection conditions. If YES, the process proceeds to S14. On the other hand, if NO, the process returns to S11 and is repeated.
[0041]
In S14, the logging function is executed in YES in S12 and YES in S13, and since it is found that the data of the checkpoint needs to be collected, the logging data is stored in the
[0042]
S15 determines whether the cache buffer is full. If YES, the process proceeds to S16. If NO, return to S11 and repeat.
In S16, since the
[0043]
In step S17, the logging data is stored in the logging file for the major category. This is because the logging data is stored in the file indicated by the full path name when the logging flag of the corresponding major classification code is ON with reference to the management table 8 of FIG. 3 described above (when OFF, it is not stored) ).
[0044]
As described above, when the
[0045]
FIG. 6 is an explanatory diagram of the present invention (logging file setting). This shows an example of a screen for setting a logging file that stores logging data according to the major classification of the logging data during operation. For example, (1) in the figure is information for storing the logging data described in FIG.
-File number:
・ Full path: C: ¥ Program Files ¥ DLOG ¥ Data ¥ logfile0
Buffer size: 1
-Number of buffer entries: 1024
・ Category: Major category
Is set. As for the major category, the major category is further displayed in the lower right window, and then checked and selected as shown in the figure, and the logging data of the selected major category is stored in the
[0046]
As described above, by setting the file number for storing the logging data and the full path name indicating the storage location for each major division, the logging according to the major classification of the logging data in S17 in the operation of FIG. 5 described above. It can be stored in a file.
[0047]
FIG. 7 shows a flowchart (search) for explaining the operation of the present invention.
In FIG. 7, S21 designates a category and a search condition (such as a time range). For example, FIG.
・ Division of (2): Minor division 000 of major division 000 to
-Search condition of (3) (time range): Ascending order from March 29, 2000 10:34:28 to March 31, 2000 11:34:28
Is specified.
[0048]
S22 targets a logging file corresponding to a large category. In this case, a logging file corresponding to the major category designated in S21 is set as a search target. As a result, the logging data is sorted into the major categories when logging and the logging data is stored in the corresponding logging file, so the logging file corresponding to the major category specified during the search need only be searched. Does not need to be searched.
[0049]
In step S23, a record of a broad category specified in the time range is extracted. This is to extract, from the logging file set as a search target in S22, a broad-category record to be searched out of records having a time range that is the search condition specified in S21.
[0050]
In S24, it is determined whether or not a format corresponding to the large category is set. This determines whether or not the
[0051]
S26 displays with the designated display application tool.
By specifying the category and search conditions as described above, the records that match the specified category are extracted from the records that match the search criteria (for example, the time range) from the specified major category logging file, and the format of the major category When the
[0052]
FIG. 8 is an explanatory diagram (section, search condition) of the present invention. This shows an example of a screen for designating a category and a search condition (here, a time range) in S21 of FIG. In the parts (2) and (3) in the figure, the following major division ranges and search conditions (time) are designated.
[0053]
(2): As a search range,
Specify the
[0054]
(3): As a time range that is a search condition,
The range is from March 29, 2000, 10:34:28 to March 31, 2000, 11:34:28, and in ascending order.
[0055]
As described above, it is possible to specify a segment range and a search condition (here, a time range and an ascending / descending order) from the screen, and search by S22 to S26 of FIG. It becomes possible.
[0056]
FIG. 9 shows an operation explanatory flowchart (link) of the present invention. This is because multiple PCs with the configuration shown in Fig. 1 are connected via a network, and the
[0057]
In FIG. 9, S31 sets a logging file to a shared file. This is because a plurality of personal computers with the configuration shown in FIG. 1 are connected via a network, the
[0058]
FIG. 10 shows an example of a process management table of the present invention. This process management table sets information on whether to collect logging data for each process for application programs that perform online operations (collection if important, collect if not important, or not) is there. According to the importance information set in this process management table, logging data is collected for each process of the application program (in the figure, processes such as unit test PT, integration test IT, system test ST, operation / maintenance, etc.) According to the setting, it is possible to automatically collect only important logging data in the process and to realize efficient logging data collection without using unnecessary logging data.
[0059]
FIG. 11 is an explanatory diagram (result) of the present invention. According to the format specified in the
[0060]
As described above, by specifying the
(Supplementary note 1) In a logging device that logs checkpoint data during application program execution in real time,
A logging function that is output when the checkpoint data matches the category or category specified by the parameter and the logging condition when embedded in the application program and executed,
Memory to save the data output by the above logging function
A logging device characterized by comprising:
(Supplementary note 2) When the logging function outputs data, one or more of a classification, a data length, a date and time, a process name, and a program name is assigned to the data as a key attribute. Logging device.
[0061]
(Supplementary note 3) In a logging device that logs checkpoint data during execution of an application program in real time,
A memory for storing one or more of a category, a data length, a date, a process name, and a program name as a key attribute for checkpoint data of an application program,
Means for searching the key attribute in the memory and extracting data that matches the specified category or category and the search condition;
Means for arranging and outputting the extracted data in accordance with the definition of a format definition file created in advance;
A logging device characterized by comprising:
(Additional remark 4) It connects with the computer system which executes the said application program via a network, The key attribute in each said memory is searched, The data which match a designated division or division and search conditions, It is characterized by the above-mentioned. The logging device according to
(Supplementary Note 5) The logging device according to any one of
(Appendix 6) A logging function that is output when a checkpoint data matches a category specified by a parameter or a logging condition when it is embedded in an application program and executed,
Means for storing the data output by the logging function in a memory;
The computer-readable recording medium which recorded the program made to function as a computer.
(Appendix 7) Means for assigning one or more of a classification, a data length, a date, a process name, and a program name as key attributes to the checkpoint data of the application program and storing them in a memory
Means for searching the key attribute in the memory and extracting data that matches the specified category or category and the search condition;
Means for arranging and outputting the extracted data in accordance with the definition of a format definition file created in advance;
The computer-readable recording medium which recorded the program made to function as a computer.
[0062]
【The invention's effect】
As described above, according to the present invention, the logging function is incorporated into the application program, and the classification or classification and collection conditions are set as necessary according to the parameters, and only the necessary data is stored in the memory. Or, because it adopts a configuration that organizes and outputs only necessary data by specifying classification and search conditions, it collects only necessary data from checkpoint data of application programs that operate online, and further It becomes possible to search and output only necessary data. This
(1) Logging data is managed by category code, and whether or not collection is possible can be easily specified as needed.
[0063]
(2) By storing the logging data in a logging file that is associated with the category, it is possible to easily and quickly select and manage the data during retrieval, and the necessary data can be taken out when necessary. it can.
[0064]
(3) By defining the format for each category in the
[0065]
(4) By adding key attributes (information such as category, sampling time, program name, process name) to the logging data and saving it, the desired logging data can be extracted easily and quickly by specifying the key attributes. Can be displayed / printed in the format.
[Brief description of the drawings]
FIG. 1 is a system configuration diagram of the present invention.
FIG. 2 is an explanatory diagram of the present invention.
FIG. 3 is an explanatory diagram (management table) of the present invention.
FIG. 4 is an operation explanatory flowchart (pre-processing) of the present invention.
FIG. 5 is an operation explanatory flowchart (operation) of the present invention.
FIG. 6 is an explanatory diagram (logging file) of the present invention.
FIG. 7 is an operation explanation flowchart (search) of the present invention.
FIG. 8 is an explanatory head (section, search condition) of the present invention.
FIG. 9 is an operation explanation flowchart (link) of the present invention.
FIG. 10 is an example of a process management table according to the present invention.
FIG. 11 is an explanatory head (result) of the present invention.
[Explanation of symbols]
1: Application (application program)
2: Logging function
3: Parameter
4, 10: Soft SW board
6: Cache buffer
7: Logging detection means
8: Management table
12: Logging file
13: Search display means
15: Format definition file
Claims (5)
アプリケーションプログラム中に組み込まれ、実行されるとチェックポイントのデータがパラメタで指定された区分あるいは区分とロギング条件に合致するか判定する処理と、前記判定する処理で合致すると判定されたときに、更に、区分毎に対応づけて当該区分毎のデータの格納の有無と当該区分毎のデータの格納場所を予め定義した管理テーブルを参照して区分毎のデータの格納の有のときに一致する区分毎の格納場所を出力し、一方、区分毎のデータの格納の無のときに出力しない処理とを実行するためのロギング関数と、
上記ロギング関数が出力したデータを保存する、区分毎に対応付けて上記格納場所を設けたメモリと
を備えたことを特徴とするロギング装置。In a logging device that logs checkpoint data during application program execution in real time,
Incorporated into the application program, when the data of when executed checkpoint is determined and determining processing whether matching the specified segment or the segment and logging conditions parameter, a matching in the determining processing, further For each category that corresponds to each category when data storage for each category is present with reference to a management table that predefines the storage location of the data for each category and the storage location of the data for each category. A logging function for executing the processing of outputting the storage location of the data, while executing the processing that is not output when there is no data storage for each category,
A logging device comprising: a memory for storing data output by the logging function, and having a storage location associated with each section.
上記メモリ中のキー属性を検索し、指定された区分あるいは区分と検索条件に合致するデータを抽出する手段と、
上記抽出したデータについて、予め作成した書式定義ファイルの定義に従って当該データを配置して出力する手段と
を備えたことを特徴とする請求項1記載のロギング装置。The memory for storing the application program checkpoint data by assigning one or more of a classification, data length, date and time, process name, and program name as a key attribute;
Means for searching the key attribute in the memory and extracting data that matches the specified category or category and the search condition;
The logging apparatus according to claim 1, further comprising means for arranging and outputting the extracted data in accordance with a definition of a format definition file created in advance.
上記ロギング関数が出力したデータを、区分毎に対応付けて上記格納場所を設けたメモリに保存する手段と
して機能させるプログラムを記録したコンピュータ読取可能な記録媒体。Incorporated into the application program, when the data of when executed checkpoint is determined and determining processing whether matching the specified segment or the segment and logging conditions parameter, a matching in the determining processing, further For each category that corresponds to each category when data storage for each category is present with reference to a management table that predefines the storage location of the data for each category and the storage location of the data for each category. A logging function for executing the processing of outputting the storage location of the data, while executing the processing that is not output when there is no data storage for each category,
A computer-readable recording medium having recorded thereon a program that functions as means for storing data output by the logging function in a memory provided with the storage location in association with each category.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2000137397A JP4767389B2 (en) | 2000-05-10 | 2000-05-10 | Logging device and recording medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2000137397A JP4767389B2 (en) | 2000-05-10 | 2000-05-10 | Logging device and recording medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2001318809A JP2001318809A (en) | 2001-11-16 |
| JP4767389B2 true JP4767389B2 (en) | 2011-09-07 |
Family
ID=18645181
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2000137397A Expired - Lifetime JP4767389B2 (en) | 2000-05-10 | 2000-05-10 | Logging device and recording medium |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4767389B2 (en) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2005346414A (en) | 2004-06-03 | 2005-12-15 | Fujitsu Ltd | Trace processing program, method and apparatus |
| US7493347B2 (en) | 2005-06-02 | 2009-02-17 | International Business Machines Corporation | Method for condensing reported checkpoint log data |
| JP5063258B2 (en) | 2007-08-23 | 2012-10-31 | インターナショナル・ビジネス・マシーンズ・コーポレーション | System, method and computer program for recording operation log |
| WO2012108020A1 (en) * | 2011-02-09 | 2012-08-16 | 三菱電機株式会社 | Log recording apparatus |
-
2000
- 2000-05-10 JP JP2000137397A patent/JP4767389B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JP2001318809A (en) | 2001-11-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP4093012B2 (en) | Hypertext inspection apparatus, method, and program | |
| KR101242369B1 (en) | Sensing, storing, indexing, and retrieving data leveraging measures of user activity, attention, and interest | |
| US8418053B2 (en) | Division program, combination program and information processing method | |
| JP6165913B1 (en) | Information processing apparatus, information processing method, and program | |
| KR20090080065A (en) | Time series search engine | |
| JPH0765035A (en) | Structured document retrieving device | |
| US20030101171A1 (en) | File search method and apparatus, and index file creation method and device | |
| CN102402563A (en) | Network information screening method and device | |
| CN113886204A (en) | User behavior data collection method and device, electronic equipment and readable storage medium | |
| CN106503186A (en) | A kind of data managing method, client and system | |
| JP4767389B2 (en) | Logging device and recording medium | |
| CN106776704A (en) | Statistical information collection method and device | |
| CN117194255A (en) | Test data maintenance method, device, equipment and storage medium | |
| CN107357919A (en) | User behaviors log inquiry system and method | |
| US20080162165A1 (en) | Method and system for analyzing non-patent references in a set of patents | |
| EP1116137B1 (en) | Database, and methods of data storage and retrieval | |
| JP7411489B2 (en) | Production knowledge management system, production knowledge management method and production knowledge management program | |
| CN116383155A (en) | Log query system based on EDA verification simulator | |
| CN110399396A (en) | Efficient data processing | |
| JP2019160134A (en) | Sentence processing device and sentence processing method | |
| Guthrie et al. | Analysis of search key retrieval on a large bibliographic file | |
| JP4130754B2 (en) | Device for extracting unique information from time series information, program for extracting unique information from time series information, and recording medium recording the program | |
| CN110347804A (en) | A kind of sensitive information detection method of linear time complexity | |
| KR101112568B1 (en) | Log Indexing Method | |
| CN119311652B (en) | Indicator generation method, system, device and medium based on behavior log |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20050616 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20080213 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20081104 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20090123 |
|
| A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20090217 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20090406 |
|
| A911 | Transfer to examiner for re-examination before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A911 Effective date: 20090422 |
|
| A912 | Re-examination (zenchi) completed and case transferred to appeal board |
Free format text: JAPANESE INTERMEDIATE CODE: A912 Effective date: 20090626 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20110422 |
|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20110615 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 4767389 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140624 Year of fee payment: 3 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| EXPY | Cancellation because of completion of term |