errsole-mysql is the official MySQL storage backend for Errsole, an open-source Node.js logger with a built-in log viewer. Version 3.0.0 depends on errsole and the mysql2 package. It enables direct logging to MySQL databases, offering a seamless integration for projects already using MySQL. Unlike generic loggers, Errsole provides a web-based interface to filter, search, and visualize logs. The plugin follows the same release cadence as Errsole core, with updates focused on compatibility and performance.
npm install errsole-mysqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes Errsole with MySQL storage using environment variables for configuration, then logs a sample info and error message.
Upgrade Node.js to 14+ and use import syntax instead of require().
Update storage configuration to use camelCase property names.
Use named imports: import { createErrsoleMySQL } from 'errsole-mysql'.Pass '{ tablePrefix: 'myapp_' }' in the configuration object to avoid collisions.Create the database manually (e.g., CREATE DATABASE logs) before starting the application.
Install the package: npm install errsole-mysql. For v3+, use ESM imports or set type: 'module' in package.json.
Use import { createErrsoleMySQL } from 'errsole-mysql' instead of import mysql from 'errsole-mysql'.Verify MYSQL_USER, MYSQL_PASSWORD, and host permissions. Consider using environment variables.
Start MySQL service or update the host/port in the configuration.