beautypg.com

Zilog EZ80F91GA User Manual

Page 39

background image

UM024502-1012

Logging to the File System

ZGATE Embedded Security Development Kit

User Manual

27

interval seconds.

The archival threshold setting for the

zgate.log

and

zg_thl.log

file is specified in the

ZGATE configuration settings and can be modified at run time using the

zg_logging

shell

command, the logging configuration web page, or the

ZGATE_set_max_logfile_size

API function.

Just before writing a new entry to the appropriate log file, ZGATE determines if the size of
the current log file exceeds the archiving threshold. If so, ZGATE erases the previous
archive file, if present, then changes the name of the current log file to that of the archive.

These archiving thresholds are not absolute maximums. ZGATE only determines the size
of the current log file before adding a new entry and will write the entire new entry to the
log file if the initial size is below the threshold.


For example, if the archiving threshold of

zgate.log

is 1000 bytes, the current size of the

file is 995 bytes, and ZGATE writes a 30-byte entry to the log, the size of the log file will
reach 1025 bytes. The next time ZGATE is about to add an entry to the

zgate.log

file,

the file will be archived to

zg_lg.old

because its size now exceeds the archiving thresh-

old. The new log entry will then be the first (and initially only item) in the new

zgate.log

file.

Note: