diff --git a/docs/fluent/overview.md b/docs/fluent/overview.md index 8f5cf61a..87d937a8 100644 --- a/docs/fluent/overview.md +++ b/docs/fluent/overview.md @@ -578,6 +578,18 @@ A key-path to the `@Children` relation is passed to `with` to tell Fluent to aut ] ``` +## Query Logging + +The Fluent drivers log the generated SQL at the debug log level. Some drivers, like FluentPostgreSQL, allow this to be configured when you configure the database. + +To set the log level, in **configure.swift** (or where you set up your application) add: + +```swift +app.logger.logLevel = .debug +``` + +This sets the log level to debug. When you next build and run your app, the SQL statements generated by Fluent will be logged to the console. + ## Next steps Congratulations on creating your first models and migrations and performing basic create and read operations. For more in-depth information on all of these features, check out their respective sections in the Fluent guide.