DM_LOGFILE Keyword


 

     DM_LOGFILE={filename}

 

This keyword is optional and enables data manager logging. If this keyword is not specified, data manager logging is disabled. Data Manager logging provides date information about processing and any errors that might occur.

 

The {filename} can have the string '@d' embedded. The '@d' string is replaced with the 'YYMMDD' date representation. This causes a new log file to be started for every day that an Data Manager Server is active.

Examples:

 

     DM_LOGFILE=security.log

 

or

 

     DM_LOGFILE=DM@d.log

 

The second example creates a log file with a name 'DM041215.log' if the current date is December 15th, 2004.

Note the following:

  1. Each record has a fixed length of 79 characters. Log records longer than 79 characters will wrap to the next log record. Records larger than 158 characters are truncated.

  2. The log file name supports a leading '#' control character. When a leading '#' character is specified, the log file startup causes any new log entries to be appended to the end of a currently existing log file.

  3.  

    Example:

     

    DM_LOGNAME=#dm.log

     

    In this case, the current logfile named 'dm.log' is used. If the 'dm.log' exists when the server is started, any new log data is appended to the end of the exists log file

     

  4. The log file name format supports an embedded control named '@T' or '@t'. This new control is replaced with the current clock time in the log file name and can be used in addition to other file name controls.

  5.  

    Example:

     

    DM_LOGNAME=dm@D_@T.log

     

    In this case, the current logfile name includes the current date and time as part of the log file name. This gives a unique log file name that should never conflict with any previously existing log files. The log file name could resolve to a name like:

     

    "dm070620_110823.log"

     

  6. Each log record has a field format as follows:

  7.  

         YYYY-MM-DD HH:MM:SS NNNN L DATA

     

         Where:

     

    YYYY-MM-DD

    Current date

    HH:MM:SS

    Current time

    NNNN

    Admin slot identification

    L

    Data Manager log level value

    DATA

    Log data

Example Log Entry 1:

 

2003-03-04 15:18:77 0002 0 Admin Child Start.....: 127.0.0.1, 2

 

This example shows the connection of an admin child task from IP address 127.0.0.1. The two (0002) indicates the admin slot id number.

Example Log Entry 2:

 

2007-01-09 07:30:23 0123 0 Cmd: 20560 Last Cmd: 20546 Error: I03 Errno: 2

                           Run: '3' Ver: '9006'

                           Prog: 'myprogram.plc'

                           FileName........: mydatafile.txt

                           ExtendedError...: WINERR:0x2

 

[Last] Cmd

For Sunbelt reference

Error

Runtime error

Errno

IO error sub-code

Run: and Ver

Run: and Ver: corresponds to the AdmGetInfo Runtime type and version information

Prog

Program that got the error

FileName

File name the program was attempting to open

Extended Error

Additional error information.

 

 

See Also: SUNDM Keywords, SUNADMIN, MAKEMFD



about_sundm DM_LOCALIP Keyword DM_LOG_RECSIZE Keyword