← Back to team overview

sikuli-driver team mailing list archive

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: Answered => Open

DeepaKiran is still having a problem:
Thanks RaiMan, My question 2 from comment #8 is about the user logs:
Currently, Sikuli's default logs are getting saved in log.txt and these logs look like below :

[log] CLICK on L(1064, 538)@S(0) [0,0 1920X1080]
[log] TYPE "username"
[log] CLICK on L(1064, 571)@S(0) [0,0 1920X1080]
[log] TYPE "password"
[log] CLICK on L(1074, 627)@S(0) [0,0 1920X1080]
[log] CLICK on L(93, 198)@S(0) [0,0 1920X1080]
[log] CLICK on L(1906, 991)@S(0) [0,0 1920X1080]

In addition to these logs, i want to insert my own log messages into
this log.txt file which I want the log to look like :

[MyLog] Logging in to the application
[log] CLICK on L(1064, 538)@S(0) [0,0 1920X1080]
[log] TYPE "username"
[log] CLICK on L(1064, 571)@S(0) [0,0 1920X1080]
[log] TYPE "password"
[log] CLICK on L(1074, 627)@S(0) [0,0 1920X1080]
[MyLog] Clicking on Data Menu
[log] CLICK on L(93, 198)@S(0) [0,0 1920X1080]
[MyLog] Clicking on sub menu
[log] CLICK on L(1906, 991)@S(0) [0,0 1920X1080]

For generating user logs , you have mentioned the steps in Point2 of comment#1 ["usage: see the method org.sikuli.Basics.user(formattable_message, args)]
But i could not find "user" in "org.sikuli.basics"
Could you please provide a sample code to add these custom logs in to my test script.

Thanks & Regards
Deepa

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