zonkyio/embedded-postgres

How do I turn on sql logging so I can see what is executing?

steppinrazor opened this issue · 2 comments

How do I turn on sql logging so I can see what is executing?

You can either enable logging directly on the PostgreSQL server, or if you use an object-relational mapping tool, you can enable logging there.

Example how to enable logging on the PostgreSQL server:

@Rule
public SingleInstancePostgresRule pg = EmbeddedPostgresRules.singleInstance()
        .customize(builder -> builder
                .setServerConfig("log_statement", "all")
                .setServerConfig("log_destination", "csvlog")
                .setServerConfig("logging_collector", "on"));

No response, I'm closing the issue.