A python implemetation for managing Nessus Professional. It provides support for launching, configuring, monotoring and reporting for scans.
GNU General Public License v2.0
0
stars
1
forks
source link
Issue with "from loguru import logger" #2
Open
cbitterfield opened 1 month ago
If the loglevel is not set or is set to one of the standard "debug, info,.." you get this error message
`-------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[14], line 4 2 username = "admin" 3 password = "xxxxxxxxx" ----> 4 nessus = PyNessusPro(nessus_server, username, password)
File ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\py_nessus_pro\py_nessus_pro.py:24, in PyNessusPro.init(self, nessus_server, username, password, log_level) 22 if log_level: 23 if log_level in ["debug", "info", "success", "warning", "warn", "error", "critical"]: ---> 24 logger.set_log_level(log_level) 26 else: 27 logger.info("Invalid log level. log_level must be one of the following: [debug, info, success, warning, warn, error, critical]")
AttributeError: 'Logger' object has no attribute 'set_log_level'`
I don't see "set_log_level" as an option for loguru
`--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[15], line 1 ----> 1 help(logger.set_log_level)
AttributeError: 'Logger' object has no attribute 'set_log_level'`
I can bypass with log_level = None
This might be more correct:
logger.level = 'debug'