poco/Data/samples/DBLogger/DBLogger.properties
Matej Kenda 52959b91da
DB logger sample (#4759)
* sample(DBLogger): New sample to demonstrate DB logging to a file. (#4750)

* sample(DBLogger): Create messages via SQL logger in a thread (#4750)

* sample(DBLogger): Save messages from SQL files to an SQL database (works with SQLite) (#4750)

* chore(Makefile): Data samples depend on PocoUtil (#4750)

* sample(DBLogger): Refactored DBLogger with std::filesystem::directory_iterator and std::thread.

* sample(DBLogger): Add missing include <condition_variable>

* sample(DBLogger): Extracted log scanning and inserting functionality to class SQLLogInserter.

* sample(DBLogger): Create new logging table only when using demo messages option.

* feat(DBLogger): VS projects

* sample(DBLogger): Acquire options from configuration file.

* feat(DBLogger): regenerate VS projects (progen file change)

* sample(DBLogger): Add example DBLogger.properties file.

* sample(DBLogger): Process as much as possible when stopping processing.

* sample(DBLogger): Meaningful defaults in properties file.

* sample(DBLogger): Verify validity of database session on startup.

* sample(DBLogger): Configure demo SQL channel in properties file.

* chore(DBLogger): style and warnings

---------

Co-authored-by: Aleksandar Fabijanic <aleks-f@users.noreply.github.com>
Co-authored-by: Alex Fabijanic <alex@pocoproject.org>
2024-11-18 17:06:20 +01:00

68 lines
1.5 KiB
Properties

#
# Database inserter (destination)
#
#
# Destination database parameters:
#
# (Mandatory) Database connector (for example sqlite)
#
DBLogger.connector = sqlite
#
# (Mandatory) Database connection string (connector specific)
#
DBLogger.constring = demo-logs.db3
#
# (Optional) Number of workers to insert logs into the database in parallel (default = 2)
#
# DBLogger.workers = 2
# ----------------------------------------------------------------
#
# (Optional) Create demo SQL messages for testing purposes (default = false)
#
DBLogger.demo = true
logging.loggers.root.channel = console
logging.loggers.root.level = information
logging.channels.console.class = ColorConsoleChannel
logging.channels.console.pattern = %L%Y-%m-%d %H:%M:%S.%i [%p] : %t
#
# SQL logger to create demo messages
# NOTE: Do not rename the logger.
#
logging.loggers.sqldemo.channel = sql
logging.loggers.sqldemo.name = SQLDemo
logging.loggers.sqldemo.level = debug
logging.channels.sql.class = SQLChannel
logging.channels.sql.name = DBLogger
#
# (Mandatory) Directory to scan for .sql files
#
logging.channels.sql.directory = .
#
# NOTE: Do not configure database to create SQL logger files
#
# logging.channels.sql.connector = SQLite
# logging.channels.sql.connect = DBLogger.db3
logging.channels.sql.timeout = 3000
logging.channels.sql.minBatch = 5
logging.channels.sql.maxBatch = 1000
logging.channels.sql.bulk = true
logging.channels.sql.table = T_LOG
logging.channels.sql.throw = false
logging.channels.sql.file = ${application.baseName}.sql