Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Logging
-
import logging logging.warning('Watch out!') # will print a message to the console logging.info('I told you so') # will not print anything
this produces no output to my pythonista console.
What is wrong -
@paul-b , your code works as expected on my system. I see the 'Watch out!' Msg in red in the console.
My system is -
('pythonista_ver_str', '3.2')
('pythonista_ver_num', '320000')
('ios_ver_str', '11.2.2')
('screen_resoultion', Size(1366.00, 1024.00))
('screen_scale', 2.0)
('machine_architecture', '64bit')
('machine_model', 'iPad7,2') -
@paul-b Ok for me also with last Pythonista and IOS versions on a iPad Mini 4...
Using script of @Phuket2 :
('pythonista_ver_str', '3.2')
('pythonista_ver_num', '320000')
('ios_ver_str', '11.2.5')
('screen_resoultion', Size(768.00, 1024.00))
('screen_scale', 2.0)
('machine_architecture', '64bit')
('machine_model', 'iPad5,1') -
@paul-b, are you getting no output at all or just output from the first line?
-
did your forget to set thenlogging levEl?
-
Mysteriously all the scripts I tried that did not work now do work even though I have not changed anything so thanks for all the suggestions
-
One thing to watch for is that logging does not get reset when globals are cleared, so your logging init code needs to check for existing handlers before adding new ones, especially if using file based handlers.