Program Examples:sys log
'sys.log' is a Linux logger that allows the programmer to document strings while his program is running. We've enabled this feature in MC-Basic context as well.
Printing sys.log
To print sys.log do the following:
1. Connect to the softMC using ssh or serial console.
2. To print the entire log, type in the Linux terminal:
-bash-3.2$ cat /var/sys.log
or
3. To print the last few lines, type in the Linux terminal:
-bash-3.2$ tail -50 /var/sys.log
where '50' is the number of lines that will be printed from the end of the file.
Sending strings to sys.log
Globally load the MC library SYSLOG.LIB.
Invoke the function
MC_BASIC_SYS_LOG(MC_BASIC_LOG_MODULE, debug_level, log_str, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10)