How to control logging for SearchLight connections? #62
Unanswered
michaelfliegner
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to silence SearchLight/Postgres but haven't succeeded yet:
[ Info: COMMIT
[ Info: SELECT "testdummycomponentrevisions"."id" AS "testdummycomponentrevisions_id", "testdummycomponentrevisions"."ref_component" AS "testdummycomponentrevisions_ref_component", "testdummycomponentrevisions"."ref_validfrom" AS "testdummycomponentrevisions_ref_validfrom", "testdummycomponentrevisions"."ref_invalidfrom" AS "testdummycomponentrevisions_ref_invalidfrom", "testdummycomponentrevisions"."description" AS "testdummycomponentrevisions_description" FROM "testdummycomponentrevisions" WHERE ref_invalidfrom=E'5' ORDER BY testdummycomponentrevisions.id ASC
[ Info: SELECT "testdummycomponentrevisions"."id" AS "testdummycomponentrevisions_id", "testdummycomponentrevisions"."ref_component" AS "testdummycomponentrevisions_ref_component", "testdummycomponentrevisions"."ref_validfrom" AS "testdummycomponentrevisions_ref_validfrom", "testdummycomponentrevisions"."ref_invalidfrom" AS "testdummycomponentrevisions_ref_invalidfrom", "testdummycomponentrevisions"."description" AS "testdummycomponentrevisions_description" FROM "testdummycomponentrevisions" WHERE ref_validfrom=E'5' ORDER BY testdummycomponentrevisions.id ASC
Test Summary: | Pass Total Time
retrospective update entity red revive and invalidate shadowed | 2 2 0.0s
Test.DefaultTestSet("retrospective update entity red revive and invalidate shadowed ", Any[], 2, false, false, true, 1.664180089097572e9, 1.664180089101505e
my code is here:
`
SearchLight.connect(SearchLight.Configuration.load())
setfield!(SearchLight.config, :log_queries, true)
setfield!(SearchLight.config, :log_level, Logging.Error)
`
and my config.yml is this
`
env: ENV["GENIE_ENV"]
dev:
adapter: PostgreSQL
database: postgres
host: 127.0.0.1
port: 5432
config:
log_queries: true
log_level: Error
`
resulting config is:
`
julia> SearchLight.config
SearchLight.Configuration.Settings("dev", "schema_migrations", "db/migrations", Dict{String, Any}("username" => "bitemporalpostgres", "client_encoding" => nothing, "passfile" => nothing, "connect_timeout" => nothing, "hostaddr" => nothing, "config" => Dict{Any, Any}("log_level" => "Error", "log_queries" => false), "port" => 5432, "adapter" => "PostgreSQL", "options" => Dict{String, String}(), "host" => "127.0.0.1"…), false, Error, true)
julia>
`
Beta Was this translation helpful? Give feedback.
All reactions