Skip to content

Commit

Permalink
fix: Allow setting log level (#1177)
Browse files Browse the repository at this point in the history
  • Loading branch information
filipecabaco authored Oct 29, 2024
1 parent 6a1ae6b commit 029082d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,11 @@ If you're using the default tenant, the URL is `ws://realtime-dev.localhost:4000
| TENANT_MAX_EVENTS_PER_SECOND | string | The default value of maximum events per second that each tenant can support, used when creating a tenant for the first time. Defaults to '100'. |
| TENANT_MAX_JOINS_PER_SECOND | string | The default value of maximum channel joins per second that each tenant can support, used when creating a tenant for the first time. Defaults to '100'. |
| SEED_SELF_HOST | boolean | Seeds the system with default tenant |
| RUN_JANITOR_AFTER_IN_MS | number | Tells system when to start janitor tasks after boot |
| RUN_JANITOR | boolean | Do you want to janitor tasks to run |
| MAX_CHILDREN_JANITOR_CLEANUP | number | Maximum number of concurrent tasks working on janitor cleanup |
| JANITOR_CLEANUP_TASK_TIMEOUT | number | Timeout for each async task for janitor cleanup |

| RUN_JANITOR_AFTER_IN_MS | number | Tells system when to start janitor tasks after boot |
| RUN_JANITOR | boolean | Do you want to janitor tasks to run |
| MAX_CHILDREN_JANITOR_CLEANUP | number | Maximum number of concurrent tasks working on janitor cleanup |
| JANITOR_CLEANUP_TASK_TIMEOUT | number | Timeout for each async task for janitor cleanup |
| LOG_LEVEL | string | Sets the log value to the running instance. Valid values: debug; info; warning; error
## WebSocket URL

The WebSocket URL is in the following format for local development: `ws://[external_id].localhost:4000/socket/websocket`
Expand Down
2 changes: 2 additions & 0 deletions config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -227,3 +227,5 @@ if System.get_env("LOGS_ENGINE") == "logflare" do
config :logger,
backends: [LogflareLogger.HttpBackend]
end

config :logger, level: System.get_env("LOG_LEVEL", "warning") |> String.to_existing_atom()
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@ services:
RLIMIT_NOFILE: 1000000
DNS_NODES: "''"
APP_NAME: realtime
LOG_LEVEL: "error"
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule Realtime.MixProject do
def project do
[
app: :realtime,
version: "2.33.11",
version: "2.33.12",
elixir: "~> 1.16.0",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
Expand Down

0 comments on commit 029082d

Please sign in to comment.