You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm submitting this "issue" to open a discussion about logging in lumitbot. Today, lumibot makes 3 assumptions about logging that I think are incorrect:
Lumibot assumes that everyone wants backtests to produce little or no logs
Lumibot assumes that everyone wants live bots to show all logs info level or greater
Lumibot assumes that it is the main app and therefore should control logging entirely
Let's talk about each...
Lumibot assumes that everyone wants backtests to produce little or no logs
The code in trader here forces console logging during backtesting to be error level or higher. I actually like seeing info logs in the console when building strategies and i can't be the only one. The whole point of logging levels is to allow people to set the level of logging to whatever they want. The workaround is to set the Trader to debug mode which seems wrong.
Lumibot assumes that everyone wants live bots to show all logs info level or greater
This line forces live bots to always log at the info level. Some people might not want that. For example, once everything in my bot is working i want to set the logging level to warning or error so my logs only tell me when things are going wrong. Typically, log_level is an env var and if i need to adjust it back to info, i can. Which takes us to point 3...
Lumibot assumes that it is the main app and therefore should control logging entirely
Lumibot removes all logging handlers and re-adds its own. This assumes that lumibot is the main app, which I will give you is probably a decent assumption. However, even given that assumption, i still think its incorrect to just hijack the logger and remove whatever people have added or changed. For example, if I add a logging handler to send me discord messages for warnings or errors, the Trader removes it.
Anyway, I'm really enjoying lumibot. I think ya'll built something pretty amazing. And i'm happy to keep contributing. And I won't touch logging again :) But I felt like documenting what I feel like are issues with lumibot logging.
The text was updated successfully, but these errors were encountered:
Hi all,
I'm submitting this "issue" to open a discussion about logging in lumitbot. Today, lumibot makes 3 assumptions about logging that I think are incorrect:
Let's talk about each...
Lumibot assumes that everyone wants backtests to produce little or no logs
The code in trader here forces console logging during backtesting to be error level or higher. I actually like seeing info logs in the console when building strategies and i can't be the only one. The whole point of logging levels is to allow people to set the level of logging to whatever they want. The workaround is to set the Trader to debug mode which seems wrong.
Lumibot assumes that everyone wants live bots to show all logs info level or greater
This line forces live bots to always log at the info level. Some people might not want that. For example, once everything in my bot is working i want to set the logging level to warning or error so my logs only tell me when things are going wrong. Typically, log_level is an env var and if i need to adjust it back to info, i can. Which takes us to point 3...
Lumibot assumes that it is the main app and therefore should control logging entirely
Lumibot removes all logging handlers and re-adds its own. This assumes that lumibot is the main app, which I will give you is probably a decent assumption. However, even given that assumption, i still think its incorrect to just hijack the logger and remove whatever people have added or changed. For example, if I add a logging handler to send me discord messages for warnings or errors, the Trader removes it.
Anyway, I'm really enjoying lumibot. I think ya'll built something pretty amazing. And i'm happy to keep contributing. And I won't touch logging again :) But I felt like documenting what I feel like are issues with lumibot logging.
The text was updated successfully, but these errors were encountered: