Closed ottonautti closed 5 years ago
Can you use Debug.off()
and Debug.on()
to temporarily switch off the logging output?
https://lackey.readthedocs.io/en/latest/lackey.html#lackey.DebugMaster.off
Can you use
Debug.off()
andDebug.on()
to temporarily switch off the logging output?https://lackey.readthedocs.io/en/latest/lackey.html#lackey.DebugMaster.off
I have tried it but I don't get the expected behaviour:
import lackey
def test_type():
print(lackey.Debug.__dict__)
np = lackey.App("Notepad")
np.focus()
lackey.type(np.window(), "my secret")
lackey.Debug.off()
test_type()
lackey.Debug.on(1)
test_type()
Outputs:
{'_debug_level': 0}
[action] Clicked at (Location object at (1440,523))
[action] Typing 'my secret' with modifiers 'None'
{'_debug_level': 1}
[action] Clicked at (Location object at (1440,523))
[action] Typing 'my secret' with modifiers 'None'
Sorry, it's been a little while since I've looked at this.
Try disabling it with lackey.Settings.ActionLogs = False
.
Turning action logs off works. Thanks!
I would like to be able to disable output to STDOUT when typing passwords to login prompts etc.