JP3278637B2 - Log file maintenance device and method - Google Patents

Log file maintenance device and method

Info

Publication number
JP3278637B2
JP3278637B2 JP16075499A JP16075499A JP3278637B2 JP 3278637 B2 JP3278637 B2 JP 3278637B2 JP 16075499 A JP16075499 A JP 16075499A JP 16075499 A JP16075499 A JP 16075499A JP 3278637 B2 JP3278637 B2 JP 3278637B2
Authority
JP
Japan
Prior art keywords
date
log
processing target
log file
record
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 - Fee Related
Application number
JP16075499A
Other languages
Japanese (ja)
Other versions
JP2000347904A (en
Inventor
真 金田
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.)
NEC Software Chubu Ltd
Original Assignee
NEC Software Chubu 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 NEC Software Chubu Ltd filed Critical NEC Software Chubu Ltd
Priority to JP16075499A priority Critical patent/JP3278637B2/en
Publication of JP2000347904A publication Critical patent/JP2000347904A/en
Application granted granted Critical
Publication of JP3278637B2 publication Critical patent/JP3278637B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、ログデータレコー
ドの部分削除ができない特性を備えるログファイルから
の毎日のログデータ抽出とログファイルのメンテナンス
装置および方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an apparatus and a method for daily log data extraction from a log file having a characteristic that a log data record cannot be partially deleted, and a maintenance method for the log file.

【0002】[0002]

【従来の技術】従来、ログファイルからのログデータ抽
出とログファイルのメンテナンスとをおこなうために
は、ログファイルと入力装置とデータ処理装置と処理対
象時間帯記憶部と抽出ログファイル群とログデータを退
避しておくファイルとから構成されていた。ログデータ
を退避しておくファイルは、ログファイルから内容を全
消去するときに必要なログを退避しておくために使用す
る。ログデータの抽出時には、ログファイル及びこの退
避ファイルからデータを抽出するものである。このよう
な構成を用い、ログの記録・消去などをおこなってい
る。
2. Description of the Related Art Conventionally, in order to perform log data extraction from a log file and maintenance of the log file, a log file, an input device, a data processing device, a processing target time zone storage unit, an extracted log file group, and a log data And files to be saved. The file in which the log data is saved is used to save a log required when all the contents are deleted from the log file. When extracting log data, data is extracted from the log file and the save file. Using such a configuration, log recording / erasing is performed.

【0003】また従来のログ情報の記録方式の一例が、
特開平10−11330号公報に記載されている。この
公報に記載されたログ記録方法およびログ記録装置は、
ログ情報を記憶する複数の部分ログ情報記憶部を備え、
複数の部分ログ情報記憶部に最後のログ情報の記録実行
日時を記憶し、ログ情報を記録するとき、部分ログ情報
記憶部に空き領域が無い場合は、最終ログ日時を参照
し、最古最終ログ日時からの経過期間を求め、保存期間
があらかじめ設定した期間を経過している場合、このロ
グ情報を削除し新たなログ情報を記録し、期間を経過し
たものが存在しない場合は、新しい部分ログ情報記憶部
を生成して発生したログ情報を記録する。
An example of a conventional log information recording method is as follows.
This is described in JP-A-10-11330. The log recording method and the log recording device described in this publication,
A plurality of partial log information storage units for storing log information,
The recording execution date and time of the last log information is stored in a plurality of partial log information storage units, and when the log information is recorded, if there is no free space in the partial log information storage unit, the last log date and time is referred to and the oldest last Obtain the elapsed time from the log date and time. If the storage period has passed the preset period, delete this log information and record new log information. A log information storage unit is generated to record log information generated.

【0004】[0004]

【発明が解決しようとする課題】しかし、この従来技術
には、次のような問題点があった。ログデータを全消去
する際に必要なデータを残しておくため、ログデータの
退避ファイルが必要なことである。このログ退避ファイ
ルがあることは、メンテナンスの手間がかかり、メンテ
ナンスを省くことが必要とされていた。
However, this prior art has the following problems. A log data save file is necessary to keep data necessary for erasing all log data. The presence of the log save file requires a lot of maintenance work, and it is necessary to omit the maintenance.

【0005】さらには、必要なログデータが退避ファイ
ルに残されているため、抽出処理しなければならないの
である。つまりログデータの退避ファイルからのデータ
を抽出するロジックが必要とされていた。
Furthermore, since necessary log data is left in the save file, it must be extracted. In other words, logic for extracting data from the log data backup file was required.

【0006】また、ログの記録方法の一例に、特開平1
0−11330号公報に記載のログ記録方法およびログ
記録装置も示されている。
An example of a log recording method is disclosed in
A log recording method and a log recording device described in Japanese Patent Application Laid-Open No. 0-11330 are also disclosed.

【0007】以上の問題点を解決するため、本発明の目
的は、ログ退避ファイルを構成から省くことによりメン
テナンスの手間がかからないログファイルのメンテナン
ス装置を提供し、ログデータレコードの部分削除ができ
ないという特性を備えたログファイルのメンテナンス装
置および方法とログファイル記録方法のプログラムを記
録する記録媒体とを提供することにある。
[0007] In order to solve the above problems, an object of the present invention is to provide a log file maintenance apparatus which does not require maintenance by omitting a log save file from the configuration, and a part of a log data record cannot be deleted. An object of the present invention is to provide a log file maintenance device and method having characteristics and a recording medium for recording a program of a log file recording method.

【0008】[0008]

【課題を解決するための手段】本発明のログファイルの
メンテナンス方法は、a)処理対象日付を入力するステ
ップと、b)前記処理対象日付の前日または前記処理対
象日付のいずれかの処理日を有する抽出ログファイル
が、抽出ログファイル群の中にあるか否かを判断するス
テップと、c)前記判断の結果、前記処理対象日付の前
日の処理日を有する抽出ログファイルがない場合、また
は、前記処理対象日付の処理日を有する抽出ログファイ
ルが既にある場合は、エラーメッセージを出力し処理を
終了するステップと、d)ステップbの判断の結果、前
記処理対象日付の前日の処理日を有する抽出ログファイ
ルがあり、前記処理対象日付の処理日を有する出ログ
ファイルがない場合は、処理対象時間帯を読み込み、
グファイル内のログの書込日時と前記処理対象日付およ
び前記処理対象時間帯とを比較し、前記処理対象日付お
よび前記処理対象時間帯内にある前記書込日時を有する
ログのデータレコードがあるか否かを判断するステップ
と、e)前記判断の結果、該当する前記データレコード
がない場合は、前記処理対象日付をセットした開始レコ
ードと終了レコードを作成し、新規の前記抽出ログファ
イルとして前記開始コードと終了レコード出力する
ステップと、f)ステップdの判断の結果、該当する前
データレコードがある場合は、新規の前記抽出ログフ
ァイルとして、前記処理対象日付をセットした開始レコ
ードを作成し出力し、前記該当するデータレコードを抽
出し出力し、終了レコードを作成し出力するステップ
と、g)前記処理対象日付の翌日以降の前記処理対象時
間帯のログが前記ログファイル内にあるか否かを判断す
るステップと、h)前記判断の結果、前記ログが存在す
る場合は、処理を終了し、前記ログが存在しない場合
は、前記ログファイルを全消去するステップと、を含
む。
According to the present invention, there is provided a method for maintaining a log file, comprising the steps of: a) inputting a processing target date; and b) determining a processing date before the processing target date or any of the processing target dates. Determining whether or not the extracted log file is included in the extracted log file group; and c) as a result of the determination, when there is no extracted log file having a processing date preceding the processing target date, or If there is already an extraction log file having the processing date of the processing target date, an error message is output and the processing is terminated; and d) as a result of the determination in step b, the processing date has the processing day before the processing target date. extraction there is a log file, if there is no extraction log file with the processing date of the processing target date reads the processing target time zone, Russia
Compared to the writing of the log in the grayed file and the processed date and the processing target time zone, having the write time in the processing target date and the processing target within the time period
E) determining whether there is a log data record ; and e) creating a start record and an end record in which the processing target date is set if there is no corresponding data record as a result of the determination. and a step of outputting a completion record and the start record as new the extracted log file, f) steps d of the determination result, if there is the data record applicable, novel the extraction Rogufu
As Airu, said processing the start record create forms and output that was set the target date, said to extract the relevant data record and output, and outputting to create a finished record, g) of the day following of the processing target date And h) determining whether or not the log of the processing target time period is in the log file ; and h) ending the process if the log exists as a result of the determination , and terminating the process if the log does not exist. Erasing the log file entirely.

【0009】本発明のプログラムを記録した記録媒体
は、a)処理対象日付を入力するステップと、b)前記
処理対象日付の前日または前記処理対象日付のいずれか
の処理日を有する抽出ログファイルが、抽出ログファイ
ル群の中にあるか否かを判断するステップと、c)前記
判断の結果、前記処理対象日付の前日の処理日を有する
抽出ログファイルがない場合、または、前記処理対象日
付の処理日を有する抽出ログファイルが既にある場合
は、エラーメッセージを出力し処理を終了するステップ
と、d)ステップbの判断の結果、前記処理対象日付の
前日の処理日を有する抽出ログファイルがあり、前記処
理対象日付の処理日を有する出ログファイルがない場
合は、処理対象時間帯を読み込み、ログファイル内のロ
グの書込日時と前記処理対象日付および前記処理対象時
間帯とを比較し、前記処理対象日付および前記処理対象
時間帯内にある前記書込日時を有するログのデータレコ
ードがあるか否かを判断するステップと、e)前記判断
の結果、該当する前記データレコードがない場合は、前
記処理対象日付をセットした開始レコードと終了レコー
ドを作成し、新規の前記抽出ログファイルとして前記開
コードと終了レコード出力するステップと、f)
ステップdの判断の結果、該当する前記データレコード
がある場合は、新規の前記抽出ログファイルとして、
記処理対象日付をセットした開始レコードを作成し出力
し、前記該当するデータレコードを抽出し出力し、終了
レコードを作成し出力するステップと、g)前記処理対
象日付の翌日以降の前記処理対象時間帯のログが前記ロ
グファイル内にあるか否かを判断するステップと、h)
前記判断の結果、前記ログが存在する場合は、処理を終
了し、前記ログが存在しない場合は、前記ログファイル
を全消去するステップと、を実行する。
[0009] The recording medium on which the program of the present invention is recorded includes: a) a step of inputting a processing target date; and b) an extraction log file having a processing date before the processing target date or any one of the processing target dates. And c) determining whether or not there is an extracted log file in the extracted log file group. C) If the result of the determination is that there is no extracted log file having a processing date preceding the processing target date, or If an extraction log file having a processing date already exists, there is a step of outputting an error message and terminating the processing, and d) as a result of the determination in step b, there is an extraction log file having a processing date of the day before the processing target date. If there is no extraction log file with the processing date of the processing target date reads the processing target time zone, in the log file and Russia
Comparing the write date and time of the log with the processing target date and the processing target time zone, and storing a data record of a log having the writing date and time within the processing target date and the processing target time zone.
And determining whether there is over-de, e) the result of the determination, if there is no said data record applicable, creates a completion record start and record that sets the processing target date, the extracted new and outputting an end record and the start record as a log file, f)
Step d of the determination result, if there is the data record <br/> applicable, data record as a new said extracted log files, which create a starting record that sets the processing target date outputs, to the relevant Extracting and outputting an end record, and generating and outputting an end record; and g) the log of the processing target time zone after the next day of the processing target date is stored in the log.
Judging whether the file is in the file or not; h)
A result of the determination, when the log exists, the process is terminated if the log does not exist, executes the steps of all-delete the log files.

【0010】本発明のログファイルのメンテナンス装置
は、入力された処理対象日付の前日または前記処理対象
日付のいずれかの処理日を有する抽出ログファイルが、
抽出ログファイル群の中にあるか否かを判断し、前記判
断の結果、前記処理対象日付の前日の処理日を有する抽
出ログファイルがない場合、または、前記処理対象日付
の処理日を有する抽出ログファイルが既にある場合は、
エラーメッセージを出力し処理を終了するファイルチェ
ック手段と、前記処理対象日付の前日の処理日を有する
抽出ログファイルがあり、前記処理対象日付の処理日を
有する出ログファイルがない場合は、処理対象時間帯
を読み込み、ログファイル内のログの書込日時と前記処
対象日付および前記処理対象時間帯とを比較し、前記
処理対象日付および前記処理対象時間帯内にある前記
込日時を有するログのデータレコードがあるか否かを判
断し、前記判断の結果、該当する前記データレコード
ない場合は、前記処理対象日付をセットした開始レコー
ドと終了レコードを作成し、新規の前記抽出ログファイ
ルとして前記開始コードと終了レコード出力し、該
当する前記データレコードがある場合は、新規の前記抽
出ログファイルとして、前記処理対象日付をセットした
開始レコードを作成し出力し、前記該当するデータレコ
ードを抽出し出力し、終了レコードを作成し出力する
ータ抽出手段と、前記処理対象日付の翌日以降の前記処
理対象時間帯のログが前記ログファイル内にあるか否か
を判断し、前記判断の結果、前記ログが存在する場合
は、処理を終了し、前記ログが存在しない場合は、前記
ログファイルを全消去するログファイルメンテナンス手
を備える。
The log file maintenance device according to the present invention is characterized in that an extracted log file having a processing date before the input processing target date or any one of the processing target dates described above,
It is determined whether or not the extracted log file is included in the extracted log file group. As a result of the determination, if there is no extracted log file having the processing date of the day before the processing target date, or the extraction having the processing date of the processing target date is performed. If you already have a log file,
File check that outputs an error message and ends processing
And click means, there is extracted log file with the previous day's processing date of the processing target date, if there is no Extraction log file with the processing date of the processing target date reads the processing target time zone, the log file The write date and time of the log is compared with the processing target date and the processing target time zone, and the log which is within the processing target date and the processing target time zone is compared .
It is determined whether or not there is a data record of a log having the date and time included in the data.If the result of the determination is that there is no corresponding data record, a start record and an end record in which the processing target date is set are created, and it outputs an end record and the start record as the extracted log file, if there is the data record applicable, novel the extract
As out of the log file, the processing of the start record create forms and output that was set the target date, the corresponding data record
De, which was to extract the over-de-output, and outputs to create a finished record
Data extraction means, and determines whether or not a log of the processing target time zone after the next day of the processing target date is present in the log file. If the result of the determination is that the log exists, the processing is performed. When the log is finished and the log does not exist, the log file maintenance procedure for deleting the log file completely is performed.
And a step .

【0011】[0011]

【発明の実施の形態】本発明は、ログファイルのデータ
処理とメンテナンスを可能にする構成を提供するもので
ある。なおログとは、コンピュータシステムの各種稼働
履歴情報のことである。ここでログファイルは、コンピ
ュータ運用中にログが毎日蓄積されていく。蓄積された
ログは、日付指定して部分的に削除することはできな
い。蓄積されたログファイルの容量が大きくなり過ぎた
場合は、内容を全消去するしかないという特性を持って
いる。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention provides a configuration which enables data processing and maintenance of a log file. The log refers to various operation history information of the computer system. Here, a log file is accumulated every day during operation of the computer. The accumulated logs cannot be partially deleted by specifying the date. When the capacity of the accumulated log file becomes too large, the content has to be completely erased.

【0012】本発明の実施例の構成を図1および図2を
参照し詳細に説明する。図1は、本発明の実施例の構成
を表すブロック図である。図2は、ログファイルの構成
を示す図である。
The structure of an embodiment of the present invention will be described in detail with reference to FIGS. FIG. 1 is a block diagram showing the configuration of the embodiment of the present invention. FIG. 2 is a diagram illustrating a configuration of a log file.

【0013】図1を参照するとログファイルのメンテナ
ンス装置は、ログファイル10と処理対象時間記憶部1
2とプログラム制御により動作するデータ処理装置14
と処理結果である抽出ログファイル18とから構成され
る。
Referring to FIG. 1, a log file maintenance device includes a log file 10 and a processing time storage unit 1.
2 and a data processing device 14 operating under program control
And an extraction log file 18 as a processing result.

【0014】データ処理装置14は、ファイルチェック
部20とデータ抽出部22とログファイルメンテナンス
部24とを有する。処理対象時間記憶部12は、開始時
刻と終了時刻をあらかじめ記憶している。ログファイル
10は、日時とログをデータ項目とするデータレコード
が格納されている。このデータレコードの内容は、コン
ピュータの基本オペレーティングシステム(OS)によ
って随時書き込まれている。抽出ログファイル群18
は、データ処理装置14によってログファイルから日単
位に抽出された抽出ログファイルを格納している。な
お、抽出ログファイルは、図2に示すように開始レコー
ド30とログを格納するデータレコード32と終了レコ
ード34とを有する。
The data processing device 14 has a file check unit 20, a data extraction unit 22, and a log file maintenance unit 24. The processing target time storage unit 12 stores a start time and an end time in advance. The log file 10 stores a data record having a date and time and a log as data items. The contents of this data record are written as needed by the basic operating system (OS) of the computer. Extracted log file group 18
Stores an extracted log file extracted by the data processing device 14 from the log file on a daily basis. The extracted log file has a start record 30, a data record 32 storing a log, and an end record 34, as shown in FIG.

【0015】図1において、ログファイル10にはログ
が書き込まれた日時とログをデータ項目とするデータレ
コードが格納されている。データ処理装置14は、入力
装置16から入力データとして処理対象日付を受け取
る。また、処理対象時間帯記憶部12から開始時刻と終
了時刻を読み込む。
In FIG. 1, a log file 10 stores a date and time when a log is written and a data record having the log as a data item. The data processing device 14 receives a processing target date from the input device 16 as input data. Further, the start time and the end time are read from the processing target time zone storage unit 12.

【0016】データ抽出部24は、ログファイル10か
ら処理対象日付の開始時刻から終了時刻までの日時を持
つデータレコードを抽出して、抽出ログファイルに書き
込む。ログファイルメンテナンス部26は、処理対象日
付の翌日以降の開始時刻から終了時刻までの日時を持つ
データレコードがログファイルに存在しないかをチェッ
クする。存在しなければログファイルを全消去する。存
在した場合には全消去しない。
The data extracting unit 24 extracts a data record having a date and time from the start time to the end time of the processing target date from the log file 10 and writes the data record into the extracted log file. The log file maintenance unit 26 checks whether a data record having a date and time from the start time to the end time after the next day of the processing target date exists in the log file. If it does not exist, delete all log files. If it exists, it is not erased.

【0017】ファイルチェック部22は、抽出ログファ
イル群18に処理対象日付の前日の抽出ログファイルが
存在しないかチェックする。存在しない場合には前日ま
での処理が順次行われていないと判断し、エラーメッセ
ージを出力し、データ抽出部、ログファイルメンテナン
ス部26の処理をおこなわずに終了する。
The file check unit 22 checks whether the extracted log file group 18 contains an extracted log file on the day before the processing target date. If not, it is determined that the processing up to the previous day has not been sequentially performed, an error message is output, and the processing ends without performing the processing of the data extraction unit and the log file maintenance unit 26.

【0018】存在した場合には、さらに処理対象日付の
抽出ログファイル51が存在しないかチェックする。存
在しない場合には以降のデータ抽出部24およびログフ
ァイルメンテナンス部26の処理をおこなう。
If it exists, it is further checked whether or not the extraction log file 51 of the processing target date exists. If not, the subsequent processing of the data extraction unit 24 and the log file maintenance unit 26 is performed.

【0019】存在した場合は、すでにその日の処理がお
こなわれていると判断し、エラーメッセージを出力し、
データ抽出部24、ログファイルメンテナンス部26の
処理をおこなわずに終了する。これにより、ログファイ
ル10の毎日の抽出処理とログファイル10のメンテナ
ンスが可能となる。
If there is, it is determined that the processing of the day has already been performed, and an error message is output.
The processing ends without performing the processing of the data extraction unit 24 and the log file maintenance unit 26. As a result, daily extraction processing of the log file 10 and maintenance of the log file 10 become possible.

【0020】次に、本発明の実施例の動作を図3を参照
して詳細に説明する。図3は、本発明のログファイルの
メンテナンス装置の動作を示す図である。
Next, the operation of the embodiment of the present invention will be described in detail with reference to FIG. FIG. 3 is a diagram showing the operation of the log file maintenance device of the present invention.

【0021】入力装置16から与えられた処理対象日付
28は、データ処理装置14に供給される。データ処理
装置14は、処理対象日付28を取得する(ステップA
1)。ファイルチェック部22は、抽出ログファイル群
18中にこの処理対象日付の前日の抽出ログファイルが
存在するか否かを判断する(ステップA2)。処理対象
日付の前日の抽出ログファイルが存在しない場合は、前
日までのログが順次抽出されていなかったと判断しエラ
ーメッセージを出力し、処理を終了する(ステップA
4)。判断の結果、処理対象日付の前日の抽出ログファ
イルが存在する場合は、さらに処理対象日付の抽出ログ
ファイルが存在するか否かを判断するする(ステップA
3)。判断の結果、処理対象日付の抽出ログファイルが
存在する場合は、すでにその日付のログが処理済みであ
るので、エラーメッセージを出力して処理を終了する
(ステップA4)。
The processing target date 28 given from the input device 16 is supplied to the data processing device 14. The data processing device 14 acquires the processing target date 28 (step A).
1). The file check unit 22 determines whether or not the extracted log file group 18 includes an extracted log file on the day before the processing target date (step A2). If there is no extracted log file on the day before the processing target date, it is determined that the logs up to the previous day have not been sequentially extracted, an error message is output, and the processing ends (step A).
4). As a result of the determination, if there is an extracted log file on the day before the processing target date, it is further determined whether or not there is an extracted log file on the processing target date (step A).
3). As a result of the determination, if there is an extracted log file of the processing target date, since the log of that date has already been processed, an error message is output and the processing ends (step A4).

【0022】ステップA3の判断の結果、処理対象日付
の抽出ログファイルが存在しない場合、データ抽出部2
4は、処理対象時間帯記憶部12から開始時刻および終
了時刻を読み込む(ステップA5)。
If the result of determination in step A3 is that there is no extracted log file for the date to be processed, the data extraction unit 2
4 reads the start time and the end time from the processing time zone storage unit 12 (step A5).

【0023】次にログファイル10から処理対象日付の
開始時刻から終了時刻までの日時を持つレコードを検索
し(ステップA6)、該当するレコードがあるか否かを
判断する(ステップA7)。判断の結果、該当するレコ
ードがない場合は、処理対象日付をセットした開始レコ
ードと終了レコードを作成し(ステップA8)、新しい
抽出ログファイルとして開始レコードと終了レコードを
出力して(ステップA9)、ステップA13へ進む。こ
の時、抽出ログファイルには該当データがないため、開
始レコードと終了レコードのみが出力される。
Next, a record having a date and time from the start time to the end time of the processing target date is searched from the log file 10 (step A6), and it is determined whether or not there is a corresponding record (step A7). If the result of the determination is that there is no applicable record, a start record and an end record in which the processing target date is set are created (step A8), and the start record and the end record are output as new extracted log files (step A9). Proceed to step A13. At this time, since there is no corresponding data in the extracted log file, only the start record and the end record are output.

【0024】ステップA7の判断の結果、該当するレコ
ードがある場合は、処理対象日付をセットした開始レコ
ードを作成し新規の抽出ログファイルとして出力し(ス
テップA10)、該当レコードを抽出して出力し(ステ
ップA11)、終了レコードを出力する(ステップA1
2)。
As a result of the determination in step A7, if there is a corresponding record, a start record in which the processing target date is set is created and output as a new extracted log file (step A10), and the corresponding record is extracted and output. (Step A11), an end record is output (Step A1)
2).

【0025】ログファイルメンテナンス部26では、処
理対象日付翌日の開始時刻から終了時刻までのログがロ
グファイルにすでに存在するかチェックする(ステップ
A13)。判断の結果、処理対象日付翌日のログがログ
ファイルに存在する場合は、ログファイルを全消去して
はいけないため、何もせずに処理を終了する。判断の結
果、処理対象日付翌日の開始時刻から終了時刻のログが
ログファイルに存在しない場合は、最後にログファイル
を全消去し(ステップA14)、処理を終了する。
The log file maintenance unit 26 checks whether a log from the start time to the end time on the day following the processing target date already exists in the log file (step A13). As a result of the determination, if the log file on the day after the processing target date exists in the log file, the log file must not be completely deleted, and the process ends without doing anything. As a result of the determination, if there is no log in the log file from the start time to the end time on the day after the processing target date, the log file is completely deleted at the end (step A14), and the process ends.

【0026】次に、図4に示す具体例を用いて本実施例
の動作を説明する。図4は、本発明のメンテナンス装置
の具体例を示す図である。
Next, the operation of this embodiment will be described with reference to a specific example shown in FIG. FIG. 4 is a diagram showing a specific example of the maintenance device of the present invention.

【0027】図4に示すように、例えば、ログファイル
10に1999年2月1日および2日のログが格納され
ている。ここで、ユーザは、処理対象日付“19990
201”を入力装置16から入力する。処理対象時間帯
記憶部12の開始時刻に“9:00”、終了時刻に“2
0:00”がセットされていたとする。
As shown in FIG. 4, for example, a log file 10 stores logs on February 1 and 2, 1999. Here, the user sets the processing target date “19990
201 ”is input from the input device 16.“ 9:00 ”is set as the start time and“ 2 ”is set as the end time in the processing target time zone storage unit 12.
0:00 "is set.

【0028】ファイルチェック部22は、処理対象日付
前日である1999年1月31日付の抽出ログファイル
が抽出ログファイル群18に存在するかチェックする。
この場合存在するので、次にデータ処理装置14は、処
理対象日付である1999年2月1日付の抽出ログファ
イルが抽出ログファイル群18に存在するかチェックす
る。この場合、存在しないので、データ抽出部24の処
理に進む。データ抽出部24は、処理対象時間帯記憶部
から開始時刻“9:00”と終了時刻“20:00”と
を読み込む。
The file check unit 22 checks whether an extracted log file dated January 31, 1999, which is the day before the processing target date, exists in the extracted log file group 18.
Since it exists in this case, the data processing device 14 checks whether the extracted log file of February 1, 1999, which is the processing target date, exists in the extracted log file group 18. In this case, since there is no data, the process proceeds to the data extraction unit 24. The data extraction unit 24 reads the start time “9:00” and the end time “20:00” from the processing time zone storage unit.

【0029】データ処理装置24は、ログファイル10
に処理対象日付である1999年2月1日の9:00か
ら20:00までの日時のログがあるか検索する。検索
の結果、該当するレコードが存在するため、データ処理
装置24は、処理対象日付をセットした開始レコード2
0−1をログファイル20へ出力し、該当レコードであ
るログファイル内のレコード10−1および10−2を
抽出し、レコード20−2および20−3をレコード2
0−1の続きへ出力し、終了レコード20−4を2レコ
ード20−3の続きへ出力する。
The data processing device 24 stores the log file 10
Is searched for a log date and time from 9:00 to 20:00 on February 1, 1999, which is the processing target date. As a result of the search, since the corresponding record exists, the data processing device 24 sets the start record 2 in which the processing target date is set.
0-1 is output to the log file 20, the corresponding records 10-1 and 10-2 in the log file are extracted, and the records 20-2 and 20-3 are converted to the record 2
The output is continued to 0-1 and the end record 20-4 is output to the continuation of two records 20-3.

【0030】ログファイルメンテナンス部26は、処理
対象日付翌日である1999年2月2日の9:00から
20:00までのログがログファイルに存在するかチェ
ックする。このとき、ログファイル10内に該当レコー
ドが存在しないのでログファイル10の内容を消去す
る。もし、該当レコードが存在すれば、ログファイル1
0の内容を消去しない。
The log file maintenance unit 26 checks whether a log file from 9:00 to 20:00 on February 2, 1999, which is the day after the processing target date, exists in the log file. At this time, since no corresponding record exists in the log file 10, the contents of the log file 10 are deleted. If the record exists, log file 1
Do not delete the contents of 0.

【0031】次に、本発明の他の実施例の構成を図5を
参照し詳細に説明する。図5は、本発明の他の実施例の
構成を表すブロック図である。
Next, the structure of another embodiment of the present invention will be described in detail with reference to FIG. FIG. 5 is a block diagram showing the configuration of another embodiment of the present invention.

【0032】図5を参照すると、本実施例は、図1に示
した実施例の構成に加え、ログ退避ファイル36を有す
る。ログ退避ファイル36は、ログファイル10の内容
を全消去するときに、一定の条件を満たすレコードで消
去をしないレコードを退避するファイルである。
Referring to FIG. 5, this embodiment has a log save file 36 in addition to the configuration of the embodiment shown in FIG. The log save file 36 is a file for saving records that satisfy certain conditions and that are not to be erased when the entire contents of the log file 10 are erased.

【0033】ログファイルメンテナンス部26は、処理
対象日付翌日以降の開始から終了時刻までのログがログ
ファイルに存在した場合、存在しているログをログファ
イル10から抽出してログ退避ファイル36に退避す
る。その後、ログファイル10の内容を全消去する。処
理対象日付翌日以降の開始から終了時刻までのログがロ
グファイルに存在しない場合は、ログファイル10の内
容をそのまま全消去する。
The log file maintenance unit 26 extracts the existing log from the log file 10 and saves the log in the log save file 36 when the log from the start to the end time after the processing target date exists in the log file. I do. After that, the entire contents of the log file 10 are deleted. If there is no log in the log file from the start to the end time after the next day of the processing target date, the entire contents of the log file 10 are deleted as it is.

【0034】次に、本発明の他の実施例の動作を図6を
参照して詳細に説明する。図6は、本発明の他の実施例
の動作を示す図である。
Next, the operation of another embodiment of the present invention will be described in detail with reference to FIG. FIG. 6 is a diagram showing the operation of another embodiment of the present invention.

【0035】図6のステップA1からA4で示される本
実施例におけるファイルチェック部22の動作は図1に
示された実施例のファイルチェック部22の動作と同一
のため、説明は省略する。
The operation of the file check unit 22 in this embodiment, which is shown by steps A1 to A4 in FIG. 6, is the same as the operation of the file check unit 22 in the embodiment shown in FIG.

【0036】データ抽出部24の動作は、まず処理対象
時間帯記憶部12から開始時刻および終了時刻を読み込
む(ステップB1)。ログ退避ファイル36内にレコー
ドが存在するか否か判断する(ステップB2)。判断の
結果、ログ退避ファイル36内にレコードが存在しない
場合は、以降のステップB5からB10およびB16ま
での動作が図1に示された実施例のデータ抽出部24の
動作と同一となる。
The operation of the data extraction unit 24 first reads the start time and the end time from the processing time zone storage unit 12 (step B1). It is determined whether or not a record exists in the log save file 36 (step B2). As a result of the determination, if there is no record in the log save file 36, the subsequent operations from step B5 to B10 and B16 are the same as the operation of the data extracting unit 24 of the embodiment shown in FIG.

【0037】一方、判断の結果ログ退避ファイル36内
にレコードが存在する場合、まず、ログ退避ファイル3
6から処理対象日付の開始時刻から終了時刻までの日時
を持つレコードを検索し(ステップB3)、該当するレ
コードがあるか否か判断する(ステップB4)。判断の
結果、該当するレコードがない場合、すでに説明したス
テップB5からB10およびB16の動作となる。
On the other hand, as a result of the determination, if a record exists in the log save file 36, first, the log save file 3
Then, a record having a date and time from the start time to the end time of the processing target date from step 6 is searched (step B3), and it is determined whether or not there is a corresponding record (step B4). If the result of the determination is that there is no corresponding record, the operations of steps B5 to B10 and B16 described above are performed.

【0038】ステップB4の判断の結果、該当レコード
がある場合は、処理対象日付をセットした開始レコード
を作成して、ログ抽出ファイル20に出力し(ステップ
B11)、該当レコードを抽出してログ抽出ファイル2
0に出力する(ステップB12)。これでログ退避ファ
イル36に残っていたログの抽出が終了する。
As a result of the determination in step B4, if there is a corresponding record, a start record in which the processing target date is set is created and output to the log extraction file 20 (step B11). File 2
0 (step B12). This completes the extraction of the logs remaining in the log save file 36.

【0039】次に、ログファイル10から処理対象日付
の開始時刻から終了時刻までの日時を持つレコードを検
索する(ステップB13)。該当するレコードがあるか
否か判断する(ステップB14)。判断の結果、該当す
るレコードがない場合は、終了レコードを作成してログ
抽出ファイル20に出力する(ステップB16)。判断
の結果、該当レコードがある場合は、該当レコードを抽
出してログ抽出ファイル20に出力する(ステップB1
5)。これで、ログファイル10からのログの抽出が完
了する。
Next, a record having a date and time from the start time to the end time of the processing target date is searched from the log file 10 (step B13). It is determined whether there is a corresponding record (step B14). If the result of the determination is that there is no applicable record, an end record is created and output to the log extraction file 20 (step B16). If the result of the determination is that there is a corresponding record, the corresponding record is extracted and output to the log extraction file 20 (step B1).
5). Thus, extraction of the log from the log file 10 is completed.

【0040】ログファイルメンテナンス部26の動作
は、まず処理対象日付翌日以降の開始から終了時刻まで
のログがログ退避ファイル36に存在するか否かを判断
する(ステップB17)。判断の結果、存在しない場合
は、ログ退避ファイル36の内容を全消去する(ステッ
プB18)。判断の結果存在する場合は、何もせず次の
ステップB19へ進む。ステップB19では、処理対象
日付の終了時刻以降のログがこんどはログファイル10
に存在するか否かを判断する。判断の結果存在しない場
合は、ログファイル10の内容を全消去する(ステップ
B21)。判断の結果存在する場合は、該当レコードを
ログ退避ファイル36に出力(退避)する(ステップB
20)。最後にログファイル10の内容を全消去する
(ステップB21)。
The operation of the log file maintenance unit 26 first determines whether or not a log from the start to the end time after the day after the processing target date exists in the log save file 36 (step B17). As a result of the determination, if the log save file 36 does not exist, the entire contents of the log save file 36 are deleted (step B18). If the result of the determination is that there is, the process proceeds to the next step B19 without doing anything. In step B19, the log after the end time of the processing target date is
It is determined whether or not it exists. If the log file does not exist, the contents of the log file 10 are entirely deleted (step B21). If the record exists, the corresponding record is output (save) to the log save file 36 (step B).
20). Finally, the contents of the log file 10 are completely deleted (step B21).

【0041】[0041]

【発明の効果】本発明のログファイルのメンテナンス装
置は、ログデータの全消去時にデータ退避用のファイル
を用意する必要がないことで、データ退避用のファイル
からのログデータの抽出ロジックが必要なくなり、処理
が簡略化される。さらに本発明のログファイルのメンテ
ナンス装置は、ログデータの抽出後、毎回ログファイル
を全消去するのではなく、必要なログが残っている場合
には、ログファイルを消去せずに残しておくことができ
る。
According to the log file maintenance apparatus of the present invention, there is no need to prepare a data save file when all log data is erased, so that there is no need for logic for extracting log data from the data save file. , The processing is simplified. Further, the log file maintenance device of the present invention does not delete the log file every time after extracting the log data, but if the necessary log remains, leave the log file without deleting it. Can be.

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

【図1】本発明の実施例の構成を表すブロック図であ
る。
FIG. 1 is a block diagram illustrating a configuration of an embodiment of the present invention.

【図2】ログファイルの構成を示す図である。FIG. 2 is a diagram showing a configuration of a log file.

【図3】本発明のログファイルのメンテナンス装置の動
作を示す図である。
FIG. 3 is a diagram showing the operation of the log file maintenance device of the present invention.

【図4】本発明のメンテナンス装置の具体例を示す図で
ある。
FIG. 4 is a diagram showing a specific example of a maintenance device of the present invention.

【図5】本発明の他の実施例の構成を表すブロック図で
ある。
FIG. 5 is a block diagram illustrating a configuration of another embodiment of the present invention.

【図6】本発明の他の実施例の動作を示す図である。FIG. 6 is a diagram showing the operation of another embodiment of the present invention.

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

10 ログファイル 12 処理対象時間帯記憶部 14 データ処理装置 16 入力装置 18 抽出ログファイル群 20 ログファイル 22 ファイルチェック部 24 データ抽出部 26 ログファイルメンテナンス部 28 処理対象日付 30 開始レコード 32 データレコード 34 終了レコード 36 ログ退避ファイル DESCRIPTION OF SYMBOLS 10 Log file 12 Processing time zone storage part 14 Data processing device 16 Input device 18 Extracted log file group 20 Log file 22 File check part 24 Data extraction part 26 Log file maintenance part 28 Processing target date 30 Start record 32 Data record 34 End Record 36 Log save file

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】a)処理対象日付を入力するステップと、 b)前記処理対象日付の前日または前記処理対象日付の
いずれかの処理日を有する抽出ログファイルが、抽出ロ
グファイル群の中にあるか否かを判断するステップと、 c)前記判断の結果、前記処理対象日付の前日の処理日
を有する抽出ログファイルがない場合、または、前記処
理対象日付の処理日を有する抽出ログファイルが既にあ
る場合は、エラーメッセージを出力し処理を終了するス
テップと、 d)ステップbの判断の結果、前記処理対象日付の前日
の処理日を有する抽出ログファイルがあり、前記処理対
象日付の処理日を有する出ログファイルがない場合
は、処理対象時間帯を読み込み、ログファイル内のログ
の書込日時と前記処理対象日付および前記処理対象時間
帯とを比較し、前記処理対象日付および前記処理対象時
間帯内にある前記書込日時を有するログのデータレコー
があるか否かを判断するステップと、 e)前記判断の結果、該当する前記データレコードがな
い場合は、前記処理対象日付をセットした開始レコード
と終了レコードを作成し、新規の前記抽出ログファイル
として前記開始コードと終了レコード出力するステ
ップと、 f)ステップdの判断の結果、該当する前記データレコ
ードがある場合は、新規の前記抽出ログファイルとし
て、前記処理対象日付をセットした開始レコードを作
し出力し、前記該当するデータレコードを抽出し出力
し、終了レコードを作成し出力するステップと、 g)前記処理対象日付の翌日以降の前記処理対象時間帯
ログが前記ログファイル内にあるか否かを判断するス
テップと、 h)前記判断の結果、前記ログが存在する場合は、処理
を終了し、前記ログが存在しない場合は、前記ログファ
イルを全消去するステップと、 を含むことを特徴とするログファイルのメンテナンス方
法。
A) inputting a processing target date; and b) an extracted log file having a processing date before the processing target date or any of the processing target dates is included in the extracted log file group. And c) determining that there is no extracted log file having a processing date on the day before the processing target date, or that there is no extracted log file having a processing date on the processing target date. If there is, the process outputs an error message and ends the process. D) As a result of the determination in step b, there is an extracted log file having a process date preceding the process target date. If you do not have extraction log file with reads the processing target time zone, log in the log file
Comparing the writing date and time with the processing target date and the processing target time zone, and recording the log data having the writing date and time within the processing target date and the processing target time zone.
And determining whether there is de, e) the result of the determination, if there is no said data record applicable, creates a completion record start and record that sets the processing target date, novel the extracted log and outputting an end record and the start record as a file, f) is determined in step d, the appropriate the data record
If there is an over-de, as a new of the extracted log file
Te, said processing the start record create forms and output that was set the target date, the extracted the relevant data record and output, and outputting to create a finished record, g) the following day of the of the processing target date a step of log processing target time period to determine whether the log file, h) a result of the determination, when the log exists, the process is terminated if the log does not exist, A method for maintaining a log file, comprising: erasing the log file entirely.
【請求項2】a)処理対象日付を入力するステップと、 b)前記処理対象日付の前日または前記処理対象日付の
いずれかの処理日を有する抽出ログファイルが、抽出ロ
グファイル群の中にあるか否かを判断するステップと、 c)前記判断の結果、前記処理対象日付の前日の処理日
を有する抽出ログファイルがない場合、または、前記処
理対象日付の処理日を有する抽出ログファイルが既にあ
る場合は、エラーメッセージを出力し処理を終了するス
テップと、 d)ステップbの判断の結果、前記処理対象日付の前日
の処理日を有する抽出ログファイルがあり、前記処理対
象日付の処理日を有する出ログファイルがない場合
は、処理対象時間帯を読み込み、ログファイル内のログ
の書込日時と前記処理対象日付および前記処理対象時間
帯とを比較し、前記処理対象日付および前記処理対象時
間帯内にある前記書込日時を有するログのデータレコー
があるか否かを判断するステップと、 e)前記判断の結果、該当する前記データレコードがな
い場合は、前記処理対象日付をセットした開始レコード
と終了レコードを作成し、新規の前記抽出ログファイル
として前記開始コードと終了レコード出力するステ
ップと、 f)ステップdの判断の結果、該当する前記データレコ
ードがある場合は、新規の前記抽出ログファイルとし
て、前記処理対象日付をセットした開始レコードを作
し出力し、前記該当するデータレコードを抽出し出力
し、終了レコードを作成し出力するステップと、 g)前記処理対象日付の翌日以降の前記処理対象時間帯
ログが前記ログファイル内にあるか否かを判断するス
テップと、 h)前記判断の結果、前記ログが存在する場合は、処理
を終了し、前記ログが存在しない場合は、前記ログファ
イルを全消去するステップと、 を実行するプログラムを記録した記録媒体。
2. A step of inputting a processing target date; and b) An extracted log file having a processing date before the processing target date or any of the processing target dates is included in the extracted log file group. And c) determining that there is no extracted log file having a processing date on the day before the processing target date, or that there is no extracted log file having a processing date on the processing target date. If there is, the process outputs an error message and ends the process. D) As a result of the determination in step b, there is an extracted log file having a process date preceding the process target date. If you do not have extraction log file with reads the processing target time zone, log in the log file
Comparing the writing date and time with the processing target date and the processing target time zone, and recording the log data having the writing date and time within the processing target date and the processing target time zone.
And determining whether there is de, e) the result of the determination, if there is no said data record applicable, creates a completion record start and record that sets the processing target date, novel the extracted log and outputting an end record and the start record as a file, f) is determined in step d, the appropriate the data record
If there is an over-de, as a new of the extracted log file
Te, said processing the start record create forms and output that was set the target date, the extracted the relevant data record and output, and outputting to create a finished record, g) the following day of the of the processing target date Judging whether or not the log of the processing target time zone exists in the log file ; and h) as a result of the judgment, if the log exists, the process is terminated; if the log does not exist, the process is terminated. A recording medium recording a program for executing the steps of: erasing the log file entirely;
【請求項3】入力された処理対象日付の前日または前記
処理対象日付のいずれかの処理日を有する抽出ログファ
イルが、抽出ログファイル群の中にあるか否かを判断
し、前記判断の結果、前記処理対象日付の前日の処理日
を有する抽出ログファイルがない場合、または、前記処
理対象日付の処理日を有する抽出ログファイルが既にあ
る場合は、エラーメッセージを出力し処理を終了する
ァイルチェック手段と、 前記処理対象日付の前日の処理日を有する抽出ログファ
イルがあり、前記処理対象日付の処理日を有する出ロ
グファイルがない場合は、処理対象時間帯を読み込み、
ログファイル内のログの書込日時と前記処理対象日付お
よび前記処理対象時間帯とを比較し、前記処理対象日付
および前記処理対象時間帯内にある前記書込日時を有す
ログのデータレコードがあるか否かを判断し、前記判
断の結果、該当する前記データレコードがない場合は、
前記処理対象日付をセットした開始レコードと終了レコ
ードを作成し、新規の前記抽出ログファイルとして前記
開始コードと終了レコード出力し、該当する前記
ータレコードがある場合は、新規の前記抽出ログファイ
ルとして、前記処理対象日付をセットした開始レコード
を作成し出力し、前記該当するデータレコードを抽出し
出力し、終了レコードを作成し出力するデータ抽出手段
と、 前記処理対象日付の翌日以降の前記処理対象時間帯の
グが前記ログファイル内にあるか否かを判断し、前記判
断の結果、前記ログが存在する場合は、処理を終了し、
前記ログが存在しない場合は、前記ログファイルを全消
去するログファイルメンテナンス手段を備えるログフ
ァイルのメンテナンス装置。
3. A determination is made as to whether an extracted log file having a processing date before the input processing target date or any of the processing target dates is included in the extracted log file group, and the result of the determination is determined. If there is no extracted log file having the day before the treatment day of the processed date, or if the extracted log file with processing date of the processed date already exists, the processing ends with an error message off
And § yl check means, there is extracted log file with the previous day's processing date of the processing target date, if there is no Extraction log file with the processing date of the processing target date reads the processing target time zone,
Comparing the log the process the writing of the log target date and the processing target time zone in the file, Ru <br/> which have a said write date in said processing target date and the processing target within the time period It is determined whether or not there is a log data record, and as a result of the determination, if there is no corresponding data record ,
It said de you create a finished record and start record that was set the processing target date, and outputs the start record and end record as a new the extracted log file of the appropriate
If there is a new data record,
Start record that sets the date to be processed as
The work form output, the extracted relevant data records and outputs, a data extraction unit <br/> for outputting create a finished record, the day after the processing target date of the processing target time zone b
It is determined whether or not the log is in the log file. If the result of the determination is that the log is present, the process is terminated,
If the log does not exist, the log file includes log file maintenance means for erasing the log file entirely.
File maintenance device.
JP16075499A 1999-06-08 1999-06-08 Log file maintenance device and method Expired - Fee Related JP3278637B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP16075499A JP3278637B2 (en) 1999-06-08 1999-06-08 Log file maintenance device and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP16075499A JP3278637B2 (en) 1999-06-08 1999-06-08 Log file maintenance device and method

Publications (2)

Publication Number Publication Date
JP2000347904A JP2000347904A (en) 2000-12-15
JP3278637B2 true JP3278637B2 (en) 2002-04-30

Family

ID=15721751

Family Applications (1)

Application Number Title Priority Date Filing Date
JP16075499A Expired - Fee Related JP3278637B2 (en) 1999-06-08 1999-06-08 Log file maintenance device and method

Country Status (1)

Country Link
JP (1) JP3278637B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6303724B2 (en) * 2014-03-31 2018-04-04 富士通株式会社 Log control method, log control program, and log control apparatus

Also Published As

Publication number Publication date
JP2000347904A (en) 2000-12-15

Similar Documents

Publication Publication Date Title
JP3278637B2 (en) Log file maintenance device and method
JP2822869B2 (en) Library file management device
US5630115A (en) Method of rewriting information on a record medium by rewriting only changed portions
JPH11212845A (en) Device and method for backup data management and recording medium
JPH0334178A (en) Time series data editing system
JP2587417B2 (en) File backup and restoration method
JP3309803B2 (en) Sorting method, method, and recording medium recording sort processing program
CN103198058A (en) File editing apparatus
JPH05151037A (en) Reorganization processing system for database in business processing
JPH01114948A (en) File edition supporting method
JP2650504B2 (en) File reconstruction device
JP3858648B2 (en) Data storage area management method and apparatus
JPH10143406A (en) File managing device
JPH04336638A (en) Disk exchange system in system working mode
JPH01147720A (en) Classification processing system
JPH06168079A (en) Data backup system
JPH03269647A (en) Editing system using information on external storage
JPH0926916A (en) Non-desctructive disk device
JP3307358B2 (en) Partial correction command method and information processing apparatus
JPH01137348A (en) Data writing system
JP2001134480A (en) System and method for file exclusive control and recording medium
JPH0644116A (en) Disk file saving control system
JPH07230359A (en) Multiplexed file access system
JPH113211A (en) Pc card setting system for computer system
JPH09297981A (en) Method for writing draw type optical disk recording medium, and software developing system

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees