E.1.2 enabling log files, E.1.3 log file message formats, E.1.3.1 general file format information – Campbell Scientific LoggerNet Datalogger Support Software User Manual

Page 534: E.1.2, E.1.3, E.1.3.1

Advertising
background image

Appendix E. Log Files

E.1.2 Enabling Log Files

Use LogTool (Options |Log File Settings) to enable logging of events to files.

If enabled, the server will write log records to text files in the log file directory

using the following file names (depending on the log type):

Transaction Log – TranX.log

Communications Log – CommsX.log

Object State Log – StateX.log

Low Level Log – IOXSerial Port_1.log

where “X” is “$” for the currently active file and 0, 1, 2, etc. for archived files.

The server stores the most recent log records in a file that has a $ character in

the place of the version number. When this file grows to the point that it will

exceed the threshold set by the File Size setting for that log, the server will

rename 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, the server will delete the

oldest of these files until the count is less than or equal to the File Count.

E.1.3 Log File Message Formats

E.1.3.1 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 LoggerNet server, this will be an empty string.

E-2

Advertising