Beamline Instrument Software Support |
|
SPEC Macro documentation:
[ Macro Index |
BCU Home ]
|
debug_log_file.mac | ||||||
[ source code | installed at | configured at ] | ||||||
See other macros in category: Debugging | ||||||
Description:
| ||||||
Documentation:
Open a log file. At eache prompt, check the size of the log file. If size exceed the limit, the file is copied to another file with a .X extention. X in 1..N. You can define the number of files to use. if set to -1, files will not be deleted. EXAMPLE SETUP DEPENDENCIES | ||||||
Macros:
Usage: dlf_setup (<file_name>, <max_size_in_Bytes>, <number_of_files>) - <file_name> : string : path + file name - <max_size_in_MB> : number : shifts log file when this limit is reached. - <max_files> : integer : -1 : do not delete files. N>0 : use N files : { f , f.1, f.2, ... , f.N-1} dlf_on Usage: dlf_on Enables log recording. dlf_off Usage: dlf_off Disables log recording. dlf_timestamp_current_logfile Usage: dlf_timestamp_current_logfile () Makes a copy of current log file for post-mortem analysis. dlf_debug Usage: dlf_debug [<debug_level>] Activates or desactivates the printing of debug messages. | ||||||
Internal Macros: | ||||||
Usage: dlf_init () To put in real fresh restart ? dlf_unsetup Usage: dlf_unsetup Remove all globals used and hiiked functions. dlf_test_log_file Usage: dlf_test_log_file () Function called at each prompt to check the size of log file and shift it if needed. dlf_msg Usage: dlf_msg (<msg>) Prints a message in green. dlf_dbg Usage: dlf_dbg (<debug_msg>, <level>) Prints a debug message if debug level is activated. dlf_err Usage: dlf_err (<err_msg>) | ||||||
|