Change database log messages to loglevel DEBUG
This commit is contained in:
@@ -37,7 +37,7 @@ class Application:
|
||||
def init_database(self):
|
||||
"""Initialize database connection."""
|
||||
init_database(self.config)
|
||||
logging.info("Database initialized")
|
||||
logging.debug("Database initialized")
|
||||
|
||||
def init_dns(self):
|
||||
"""Initialize DNS service."""
|
||||
|
||||
@@ -90,7 +90,7 @@ def init_database(config: dict):
|
||||
if db_dir:
|
||||
os.makedirs(db_dir, exist_ok=True)
|
||||
db.init(db_path)
|
||||
logging.info(f"Database backend: SQLite path={db_path}")
|
||||
logging.debug(f"Database backend: SQLite path={db_path}")
|
||||
|
||||
elif backend == "mariadb":
|
||||
db = MySQLDatabase(
|
||||
@@ -104,7 +104,7 @@ def init_database(config: dict):
|
||||
User._meta.database = db
|
||||
Hostname._meta.database = db
|
||||
Version._meta.database = db
|
||||
logging.info(f"Database backend: MariaDB db={config['database']['database']}")
|
||||
logging.debug(f"Database backend: MariaDB db={config['database']['database']}")
|
||||
|
||||
else:
|
||||
raise ValueError(f"Unknown database backend: {backend}")
|
||||
@@ -117,7 +117,7 @@ def create_tables():
|
||||
db.create_tables([User, Hostname, Version])
|
||||
if Version.select().count() == 0:
|
||||
Version.create(version=DATABASE_VERSION)
|
||||
logging.info("Database tables created")
|
||||
logging.debug("Database tables created")
|
||||
|
||||
|
||||
def get_user(username: str):
|
||||
|
||||
Reference in New Issue
Block a user