Skip to main content

A simple logger class for MySQL and MariaDB

Project description


A simple logger class for MySQL and MariaDB

$ pip install mysql-logger
Usage example
from mysql_logger import MySQLLogger

# DB must be created before
db_settings = {
    'user': 'username',
    'password': 'Pa55w0rd',
    'host': 'localhost',
    'port': 3306,
    'database': 'my_log_db'

# Table will be automatically created (if not exists)
table_name = 'software_name'

# Initialize the logger
logger = MySQLLogger(db_settings, table_name)

# Log messages'log info level message')
logger.error('log error level message')



v0.0.1 (2021-10-05)

  • Initial release.
  • Logger levels: debug, info, warning, error.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for mysql-logger, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size mysql-logger-0.0.1.tar.gz (3.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page