Skip to content

Disable database driver logging or restrict to debug-level only #9

@atc0005

Description

@atc0005

Current logging from a pre-v0.1.0 build:

  INFO[0000] mysql2sqlite dev build (https://github.com/atc0005/mysql2sqlite)
  INFO[0000] Connection established to database server at 127.0.0.1:3306
  INFO[0000] Connection established to SQLite database at /var/cache/mysql2sqlite/mailserver.db
  WARN[0000] Fake delay in order to allow for destruction
  INFO[0010] Successfully copied 4 rows from source database table transport_maps
  WARN[0010] Fake delay in order to allow for destruction
[mysql] 2020/09/25 10:33:25 packets.go:122: closing bad idle connection: unexpected read from socket
[mysql] 2020/09/25 10:33:25 connection.go:158: driver: bad connection
  WARN[0020] Transaction rollback complete
 FATAL[0020] failed to prepare row count statement for table access_check_senders: dial tcp 127.0.0.1:3306: connect: connection refused

These lines are useful, but unexpected:

[mysql] 2020/09/25 10:33:25 packets.go:122: closing bad idle connection: unexpected read from socket
[mysql] 2020/09/25 10:33:25 connection.go:158: driver: bad connection

Does the driver offer a way to toggle that output? This output is specific to MySQL, but the concern applies to any database connection used by this application.

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions