startlog ('<log file name>', [0 or 1])
second argument is optional and 1 is default value
0 - Append log to an existing file
1 - Write log to a new file. If file already exist, then erase existing file content and start log
Start logging on the specified file. Default log level set is logging.WARNING. Though this can be changed with setloglevel LDTP API.
Log file will be created if log file is not present in any case. If second argument is 1, then existing file content will be erased. If second argument is 0, then new logs will be append to existing log.
- Return values:
|1 ||on Success and 0 on error|
If we want to overwrite existing log file or create new log file:
startlog ('evolution.xml', 1)
If we want to append existing log file or create new log file:
startlog ('evolution.xml', 0)
- Nagappan <firstname.lastname@example.org>