Skip to content

Commit

Permalink
Rename env vars to avoid confusion between log output and shape logs
Browse files Browse the repository at this point in the history
  • Loading branch information
alco committed Dec 2, 2024
1 parent 73a2fa4 commit 6f72e61
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/sync-service/.env.dev
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
LOG_LEVEL=debug
ELECTRIC_LOG_LEVEL=debug
DATABASE_URL=postgresql://postgres:password@localhost:54321/electric?sslmode=disable
ELECTRIC_ENABLE_INTEGRATION_TESTING=true
ELECTRIC_CACHE_MAX_AGE=1
ELECTRIC_CACHE_STALE_AGE=3
# using a small chunk size of 10kB for dev to speed up tests
ELECTRIC_LOG_CHUNK_BYTES_THRESHOLD=10000
ELECTRIC_SHAPE_CHUNK_BYTES_THRESHOLD=10000
# configuring a second database for multi-tenancy integration testing
OTHER_DATABASE_URL=postgresql://postgres:password@localhost:54322/electric?sslmode=disable
2 changes: 1 addition & 1 deletion packages/sync-service/.env.test
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LOG_LEVEL=info
ELECTRIC_LOG_LEVEL=info
DATABASE_URL=postgresql://postgres:password@localhost:54321/postgres?sslmode=disable
6 changes: 3 additions & 3 deletions packages/sync-service/config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if config_env() in [:dev, :test] do
end

log_level_config =
env!("LOG_LEVEL", :string, "info")
env!("ELECTRIC_LOG_LEVEL", :string, "info")
|> Electric.ConfigParser.parse_log_level()

case log_level_config do
Expand All @@ -19,7 +19,7 @@ case log_level_config do
raise message
end

if !env!("LOG_COLORS", :boolean, true) do
if !env!("ELECTRIC_LOG_COLORS", :boolean, true) do
config :logger, :default_formatter, colors: [enabled: false]
end

Expand Down Expand Up @@ -144,7 +144,7 @@ persistent_kv =

chunk_bytes_threshold =
env!(
"ELECTRIC_LOG_CHUNK_BYTES_THRESHOLD",
"ELECTRIC_SHAPE_CHUNK_BYTES_THRESHOLD",
:integer,
Electric.ShapeCache.LogChunker.default_chunk_size_threshold()
)
Expand Down

0 comments on commit 6f72e61

Please sign in to comment.