What is the difference between logging (such as log.info()
) and print()
?
The following post talks about logging, but not about print
.
https://www.quantopian.com/posts/warn-logging-limit-exceeded-some-messages-discarded-why
I use print()
in my code to send output to the console. I have two problems with it:
1. I sometimes see the WARN Logging limit exceeded; some messages discarded
message thrown within handle_data(context,data)
. It's not clear what causes it. The number of calls to print
within one handle_data
? It does not always happen after the same numbers of calls to print
.
2. Sometimes the output of one call to print
is truncated. When does it happen?
Another question - is there a convenient way to copy the output from the console to the clipboard, so I could look at it in a text editor (the web console is very hard to work with)? Right now I have to scroll all the way down, which takes a long time since the console is not loaded unless I scroll down. Then I have to scroll again all the way up which also takes a long time since it gets unloaded.
Is there a way to send output through the code not to the console - but to another location such as email, or a file?