MySQLLogger
A simple logger class for MySQL and MariaDB
Installation
$ pip install mysql-logger
Usage example
from mysql_logger import MySQLLogger
db_settings = {
'user': 'username',
'password': 'Pa55w0rd',
'host': 'localhost',
'port': 3306,
'database': 'my_log_db'
}
table_name = 'software_name'
logger = MySQLLogger(db_settings, table_name)
logger.info('log info level message')
logger.error('log error level message')
Dependencies
Changes
v0.0.1 (2021-10-05)
- Initial release.
- Logger levels: debug, info, warning, error.