| This is an external module.
Please note that it may or may not work with the current release (1.7.4).
This module is not included in the default ZNC installation, and you will need to manually compile it before you can load this module.
Contact the author if you have any questions, but feel free to ask on #znc (chat.freenode.net). Someone might be able to help you there.
This is a global Python module for MySQL/SQLite logging.
GitHub repository: https://github.com/stil/zlog-sql
- Supports both MySQL and SQLite databases.
- Asynchronous database writes on separate thread. Guarantees that ZNC won't hang during SQL connection timeout.
- Automatic table creation (CREATE TABLE IF NOT EXIST)
- Retry after failed inserts. When database server is offline, logs are buffered to memory. They are saved when database is back online, so you won't lose logs during MySQL outages.
- In Webadmin, open the list of Global Modules.
- Make sure
- Enable module
zlog_sqland set its argument.
For MySQL, set module argument matching following format:
Important: you need
PyMySQL pip package for MySQL logging. Install it with
pip3 install PyMySQL command.
For SQLite use following string format:
or simply leave out the path
in this case, logs are going to be written to the default path
- Save changes. SQL table schema is going to be created automatically.