sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #22902
Re: [Question #241257]: How to save sikuli logs into an external file
Question #241257 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/241257
Status: Open => Answered
RaiMan proposed the following answer:
--1. log verbosity
there are switches, that control the log verbosity of Sikuli:
Settings.ActionLogs=true/false // starting with [log]
Settings.InfoLogs=true/false // starting with [info]
setting to false: the respective logs will be suppressed
additionally there are [error] messages in some situations, which cannot
be suppressed currently.
--2. user logs (version 1.0.1+)
you can have user logs (starting with label [user] in the standard)
Settings.UserLogs=true/false // switch on/off
Settings.UserLogPrefix = "mylog" // optional: specifies the label text
usage: see the method org.sikuli.Basics.user(formattable_message, args)
--3. with timestamp (version 1.0.1+)
Sikuli logs and user logs can have time stamps at the end of the label
Settings.LogTime = true/false; // switch on/off for Sikuli logs
Settings.UserLogTime = true/false; // switch on/off for user logs (default: true)
--4. write the logs to a file (version 1.0.1+)
the class org.sikuli.basics.Debug has static methods to redirect the logs to a file:
setLogFile(String fileName); // opens a PrintStream for the given file, where all Sikuli logs are written
setUserLogFile(String fileName); // opens a PrintStream for the given file, where all user logs are written
both can be called with filename as null. Then the filename is expected in java system properties
sikuli.Logfile and sikuli.LogfileUser respectively.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.