← Back to team overview

sikuli-driver team mailing list archive

[Question #267750]: user and default log problem

 

New question #267750 on Sikuli:
https://answers.launchpad.net/sikuli/+question/267750

Environment: Eclipse + Java + SikuliX-1.0.1
Hi Raiman,

I am working the logs as mentioned on the sikulix document as below:

-----------------
6.1.2 Writing and redirecting log and debug messages
these are the relevant Settings for user logging showing defaults: (False = switched off, True = switched on)
• Settings.UserLogs = True (False: user log calls are ignored)
• Settings.UserLogPrefix = "user" (message prefix)
• Settings.UserLogTime = True
• Debug.setUserLogfile("absolute-path-to-file") (no default)

the settings for Sikuli’s logging with the defaults: (False = switched off (message type not created), True =
switched on)
• Settings.ActionLogs = True (message prefix: [log])
• Settings.InfoLogs = True (message prefix: [info])
• Settings.DebugLogs = False (message prefix: [debug])
• Settings.LogTime = False
• Debug.setLogfile("absolute-path-to-file") to redirect the Sikuli messages to a file, no default
-------------------

snippet of codes:
------
for loop {
	//for debug only.
	Settings.UserLogs = true;
	Settings.UserLogPrefix = "steiryx";
	Settings.UserLogTime = true;
	Debug.user("check this out.");
	Debug.setUserLogFile(path.dir_name_ + "tool_user.log");

	Settings.ActionLogs = true;
	Settings.InfoLogs = true;	//not sure what log is this.
	Settings.DebugLogs = true;	//not sure what log is this.
	Settings.LogTime = true;
	Debug.setLogFile(path.dir_name_ + "tool_def.log");
}
------

For tool_user.log
"check this out." comes out on Eclipse console log only once
"check this out." comes out multiple times when I move the Debug.setUserLogFile
outside(below) the loop.
But in any case the file is still blank.

For tool_def.log
No logs at all even if the setLogFile is outside(below) the for loop.

I tried to put the Debug.setUserLogFile and setLogFile before the loop and it works!
So need to give first the file where it should be written.

My question will be regarding my comments
Settings.InfoLogs = true;	//not sure what log is this.
Settings.DebugLogs = true;	//not sure what log is this.

i tried to make it true/false but no changes in log at all.
[log (15/06/04 16:04:34)] CLICK on L(557,730)@S(0)[0,0 1280x1024]
What should be the difference I should see?

    


-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.