Logging written to console without call to logging.flush()

I am using Psychopy3 v3.6.5 on win10. During my experiment, logging messages are printed to my console without me calling logging.flush(). I do want logging messages, but I don’t want them printed out at points in my experiment where latencies are important.

When does the logging module print out messages without an explicit call to logging.flush() and why?

Thank you for your help! :slight_smile:

Hi @LukasPsy, are you using Builder or Coder to run your experiments? There are various levels for logged messages with the following order of importance: ERROR, WARNING, DATA, EXP, INFO and DEBUG. Set to ERROR to receive only error messages in your console.

In Builder, you go to Experiment Settings > Data, and set the logging level from there. Code examples are in the link below.

https://www.psychopy.org/api/logging.html

Thank you for your reply. :slight_smile:

I’m using the coder version; sorry that I didn’t mention that. I’m familiar with the levels for logged messages. What I am interested in is whether PsychoPy writes the messages to the log file and the console only when I call logging.flush() or whether it calls logging.flush() or a similar function under the hood at some points (which is my impression)?

If logging messages are written to the console under the hood, my question would be when this is done.