Blank log file when run from command line
*******
Since you do not see anything in the logfile, you are using simple print statements for your "logging" and not the features as described here: http://
the print statement's output in the standard goes to stdout, which in turn in the IDE is per default redirected to the message area.
see: http://
and the option -c to start the IDE from a commandline and switch off the message box, so all print output goes to stdout (commandline), which in turn can be redirected to a file using > (as you already did for a scriptrun).
you might also use the print statement to directly print to a file:
fLog = open(fnameLog, "w")
print >> fLog, "print test"
fLog.close()
where fnameLog is a valid filename string, that might be formed using os.path.join()
all this is standard Python
-------
hi kinda new at this and testing some log outputs. When using the IDE with the Settings.LogTime the message area displays perfectly. When I try to redirect that output to a simple txt it's a blank file, even the default non-specificed "WorkingDir/
EDIT: I should mention im using 1.1.0 for now on a WIN 10 machine
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- RaiMan
- Solved:
- Last query:
- Last reply: