CxDatalogger shrink process (server side)

Each executed CxFrame instance has exactly one log file (the file name contains the application ID). The log file is always in use and cannot be viewed directly.

Each executed CxFrame instance can have exactly one LogArchive (the file name contains the application ID).

Cyclically it is checked (at application start and then every 10h) if old messages (Registry: PurgeOlderThen [d]) must be deleted from the log file. The file is only reorganized(shrinked) if the log file would be reduced by at least 30%.
Also the log file will be shrinked by 30% if it has reached its maximum size (Registry: MaxFileSize [MB, 0 = Maximum]).

Reorganize:

  • The log file is closed and a new empty log file is opened.

  • The latest 70% of the old log file is copied to the new log file.

  • If DeleteOldFilesAfter [d] <> 0, the oldest 30% of the old log file is copied to <AppID>_CxDataLogger_YYYMMDD_HHMMSS.CxLogData copied.

  • The file AppID>_CxDataLogger_YYYMMDD_HHMMSS.CxLogData is included in the LogArchive (zip file) AppID>_CxDataLogger.CxLogArchive is included.

  • If DeleteOldFilesAfter [d] > 0, old log files are deleted from the LogArchive.

  • The log process continues.



CodX Software CodX Software AG
Sinserstrasse 47
6330 Cham
Switzerland
Support
http://support.codx.ch
CxSpickel