nextpy
nextpy copied to clipboard
Improved logging in multiagent_manager
The issue:
Logging in MultiagentManager currently uses print statements with a conditional variable passed as a parameter "debug" with the default value False. This is a temporary solution.
The solution:
Whenever the conditional variable "debug" is checked, simply store the current logging level in a variable, set current logging to DEBUG, log the statement, then set the logging level back to its original state. This way if a user has previously not set the logging, they do not need to manually do it in their code, they can simply pass "debug"=True. This is also helpful when you have multiple managers but you only want to debug one of them.