Closed CriProphet closed 3 years ago
The log level is entirely up to the caller, pypsrp doesn't set anything and it shouldn't be the decider in this. If you are talking about how Ansible sets the log to DEBUG then that's a problem on their side and not something that can be solved here.
The current log level is the default log level. Each module uses the logging module to generate logs. The default log level of the logging module is DEBUG. This setting causes a large number of unnecessary logs to be generated during program execution, occupying too much disk space. Can I write a log module? This command is used in pypsrp and request-credssp and sets the default log level to INFO. When debugging is required, you can switch the log level to DEBUG or a lower level. When debugging is not required, you can switch the log level to INFO or a higher level.
log = logging.getLogger(__name__)
log.setLevel(logging.INFO)