C.1.2 log file message formats, C.1.2.1 general file format information, C.1.2.2 transaction log format – Campbell Scientific PC400 Datalogger Support Software User Manual

Page 236

Advertising
background image

Appendix C. Log Files and the LogTool Application

have been created, the oldest log file is deleted as a new one begun. PC400
stores the most recent log records in a file that has a $ character in the place of
the version number or “X” in the above file names. When this file grows to the
point that it will exceed the threshold set by the File Size setting for that log
(default 1.4MB in PC400), the server renames the log file by replacing the
dollar sign with a new version number. At the same time that the server rolls
over to a new log file, the File Count parameter for that log will also be
evaluated. If there are more saved files for that log than are allowed by the File
Count parameter (default is five files in PC400), the server will delete the
oldest of these files until the count is less than or equal to the File Count.

C.1.2 Log File Message Formats

C.1.2.1

C.1.2.2

General File Format Information

The communications status, transaction, and object state logs all share the same
basic file format. Each record in a log file ends with a carriage return and line
feed. A single record will consist of two or more fields where each field is
surrounded by quotation marks and separated by commas.

The two fields that will be present in all records are:

Timestamp – The server time when the record was generated. It will have the
following format:

YYYY-MM-DD HH:MM:SS.mmm

where “YYYY” is the 4-digit year, “MM” is the month number, “DD” is the
day of the month, “HH” is the hour in the day (24 hour format), “MM” is the
minutes into the hour, “SS” is the seconds into the minute, and “mmm” is the
milliseconds into the second.

Device Name – The name of the device associated with the message. If the
message is associated with the PC400 server, this will be an empty string.

Transaction Log Format

Each record in the transaction log includes at least two fields in addition to the
timestamp and device name:

Message Type Code – Identifies the type of event that has occurred. This is a
number that corresponds to the description immediately following. If this log
is being read by a software program, a number is very easy to use for
comparison when looking for specific message types.

Message Type Description – Text that describes the message type code.

The following table is a list of the different messages that can appear in the
transaction log, some of the optional parameters and what the message means.
Where appropriate, a suggested response to the message is provided.

C-2

Advertising