CustomLoggerSQLDatabase does not override logger
@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
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from vapor/sql-kit
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Suggest \(bind: ...) instead of \(unsafeRaw: ...) in raw queries?May be free again @gwynne claimed this 600 days ago, and no pull request is open. Open
-
Affect row count from insert, update and deleteMay be free again @gwynne claimed this 898 days ago, and no pull request is open. Open
Similar issues
-
Xcode 27Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
airbnb/HorizonCalendar#349 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
TelegramMessenger/Telegram-iOS#2354 ·
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:other issue-rating: 🦞 diamond lobster no-stale P2
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
steipete/CodexBar#4202 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Maintainers usually reply within 1 day
-
api: remoteconfig
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
firebase/firebase-ios-sdk#16816 · 1 comment ·
Maintainers usually reply within 1 day