Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

CustomLoggerSQLDatabase does not override logger

Open
#159 0 comments 0 reactions 1 assignee View on GitHub

@gwynne is already working on this.

Since Aug 30, 2025.

Assessment

This issue has not been assessed yet.

Description

var logger = Logger(label: "My Logger")
logger.logLevel = .trace // to show label

let sqldb = app.db as! SQLDatabase
let logdb = sqldb.logging(to: logger)

try! logdb.raw("select 1;").run().wait()
// Expected: [ My Logger ] [ DEBUG ] select 1; [] [database-id: mysql]
// Actual  : [ codes.vapor.application ] [ DEBUG ] select 1; [] [database-id: mysql]

The type of logdb is CustomLoggerSQLDatabase.
Its execute method simply calls wrapped database's execute. logger is unused.

Dominant language
Swift
Stars
292
Forks
59
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from vapor/sql-kit

All issues in vapor/sql-kit

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.