|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 5120 (0x1400) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package Log_Reader, seg_012b16
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦this⟧
with Calendar; with Time_Utilities; with Simple_Status; package Log_Reader is -- Abstraction for reading the system error log. -- -- Provides an Iterator that automatically crosses log files and also -- extends into the current active error log. Thus, log messages -- can be read right up to the last one issued by the system. -- -- The date part of the date/time for an entry is impossible to know for -- the first few entries in the first available log file. In this case, -- 1/1/1901 is returned (or 1/2/1901, if midnight occurs in these few -- date unknown entries). -- -- Continuation lines are automatically incorporated into each entry so that -- each call to Next moves to a complete new entry. Continuation lines -- are read as part of the Message field and are preceded by ASCII.lf -- characters. -- -- NOTE: This package makes an assumption about the Error Log files -- that it processes. It assumes that the log file names are in the -- form of Log_YY_MM_DD_At_HH_MM_SS, this is the form that the error log -- daemon creates file names as in the directory !Machine.Error_Logs, -- and that the time embedded in the file name accurately represents the -- times of the entries in the file. procedure Load_Logs (From_Directory : String := "!machine.error_logs"); procedure Load_Logs (Start_Time : Calendar.Time; Stop_Time : Calendar.Time; From_Directory : String := "!machine.error_logs"); -- Initialize the module. Must be called before any other operations. -- Builds map of log files in the specified directory. Specifying a -- start and stop time will reduce the number of log files examined to -- those created during the given period. Otherwise, all log files in -- the given directory are examined. -- -- NOTE: The Start_Time and Stop_Time entered by this procedure are -- used as the start date and stop date. This means that the time -- part of the Calendar.Time variable is ignored. This package will -- iterate over the log entries from 00:00:01 of the start date to -- 23:59:59 of the stop date (or as much as is available in the log -- files and the current day's log messages). type Iterator is private; procedure Initialize (I : out Iterator; Status : in out Simple_Status.Condition); procedure Next (I : in out Iterator; Status : in out Simple_Status.Condition); function Done (I : Iterator) return Boolean; function Current_Entry (I : Iterator) return String; function Current_Time (I : Iterator) return Time_Utilities.Time; function Current_Severity (I : Iterator) return String; function Current_Client (I : Iterator) return String; function Current_Condition (I : Iterator) return String; function Current_Message (I : Iterator) return String; function Current_File (I : Iterator) return String; function Get_Time (Log_Entry : String) return Time_Utilities.Time; -- Note that only the HH:MM:SS part of the time is set by this operation function Severity (Log_Entry : String) return String; function Client (Log_Entry : String) return String; function Condition (Log_Entry : String) return String; function Message (Log_Entry : String) return String; function Number_Of_Log_Files return Natural; -- Returns number of log files that exist. Defined only after call -- to Load_Logs. private type Iterator_Data; type Iterator is access Iterator_Data; end Log_Reader;
nblk1=4 nid=0 hdr6=8 [0x00] rec0=19 rec1=00 rec2=01 rec3=022 [0x01] rec0=13 rec1=00 rec2=02 rec3=080 [0x02] rec0=15 rec1=00 rec2=03 rec3=050 [0x03] rec0=12 rec1=00 rec2=04 rec3=001 tail 0x2170e631282b14da4c165 0x42a00088462060003