112
CITIZEN UWP POS Print SDK - Programming Manual
4.4.
Notes
Notes of this SDK are as follows.
4.4.1. Logging function
This SDK supports the log function which records the methods and the events. When setting the log
function, use the
, or placing a file "CSJPOSLibS.cfg" of the next format in the LocalFolder.
< Example of CSJPOSLibS.cfg >
[LogSetting]
... Section name (Fixed)
LogMode=1
... Specifies the log mode.
LogPath=Log
... Specifies the relative path from the LocalFolder to store the log files.
LogMaxSize=10
... Specifies the maximum size of log file in MB.
Setting items
- LogMode
Specifies a log mode:
0: None
1: Access log
2: Error log
- LogPath
Specifies a folder which log files will be stored. It must be described as relative path from the local
folder. When this setting is not specified, log files will be stored into the local folder.
- LogMaxSize
Specifies maximum size of a log file in MB. If 0 is specified, log data will be written without limit.
Log file name
Log files will be stored with a file name "CSJPOSLibS_" and a number which indicates the day of week (0
to 6. 0: Sunday, 1: Monday...), and a file extension ".log."
Example: CSJPOSLibS_1.log
If a log file is already existing and it is older than today, it will be deleted, and the log data will be
recorded into a new file. (It will be held for one week.)
Log format
A log file keeps information of the executed methods, accessed properties, timestamps and results.
--- Example 1, method (Connect) ---
2019/12/24 13:26:41.951 8028 008 METHOD call ConnectAsync(0, "192.168.10.100")
2019/12/24 13:26:43.114 8028 008 METHOD result ConnectAsync() -> Success(0)
--- Example 2, event (DataEvent) ---
2019/12/24 13:26:49.568 8028 008 EVENT DataEvent : 31 32 33 34 35 36 37 38 39 30