forked from blockscout/blockscout
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.exs
77 lines (69 loc) · 3.26 KB
/
config.exs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# This file is responsible for configuring your application
# and its dependencies with the aid of the Config module.
import Config
# By default, the umbrella project as well as each child
# application will require this configuration file, ensuring
# they all use the same configuration. While one could
# configure all applications here, we prefer to delegate
# back to each application for organization purposes.
for config <- "../apps/*/config/config.exs" |> Path.expand(__DIR__) |> Path.wildcard() do
import_config config
end
config :phoenix, :json_library, Jason
config :logger,
backends: [
# all applications and all levels
:console,
# all applications, but only errors
{LoggerFileBackend, :error},
# only :ecto, but all levels
{LoggerFileBackend, :ecto},
# only :block_scout_web, but all levels
{LoggerFileBackend, :block_scout_web},
# only :ethereum_jsonrpc, but all levels
{LoggerFileBackend, :ethereum_jsonrpc},
# only :explorer, but all levels
{LoggerFileBackend, :explorer},
# only :indexer, but all levels
{LoggerFileBackend, :indexer},
{LoggerFileBackend, :indexer_token_balances},
{LoggerFileBackend, :token_instances},
{LoggerFileBackend, :reading_token_functions},
{LoggerFileBackend, :pending_transactions_to_refetch},
{LoggerFileBackend, :empty_blocks_to_refetch},
{LoggerFileBackend, :withdrawal},
{LoggerFileBackend, :api},
{LoggerFileBackend, :block_import_timings},
{LoggerFileBackend, :account},
{LoggerFileBackend, :api_v2},
LoggerJSON
]
config :logger_json, :backend,
metadata:
~w(application fetcher request_id first_block_number last_block_number missing_block_range_count missing_block_count
block_number step count error_count shrunk import_id transaction_id duration status unit endpoint method)a,
json_encoder: Jason,
formatter: LoggerJSON.Formatters.BasicLogger
config :logger, :console,
# Use same format for all loggers, even though the level should only ever be `:error` for `:error` backend
format: "$dateT$time $metadata[$level] $message\n",
metadata:
~w(application fetcher request_id first_block_number last_block_number missing_block_range_count missing_block_count
block_number step count error_count shrunk import_id transaction_id)a
config :logger, :ecto,
# Use same format for all loggers, even though the level should only ever be `:error` for `:error` backend
format: "$dateT$time $metadata[$level] $message\n",
metadata:
~w(application fetcher request_id first_block_number last_block_number missing_block_range_count missing_block_count
block_number step count error_count shrunk import_id transaction_id)a,
metadata_filter: [application: :ecto]
config :logger, :error,
# Use same format for all loggers, even though the level should only ever be `:error` for `:error` backend
format: "$dateT$time $metadata[$level] $message\n",
level: :error,
metadata:
~w(application fetcher request_id first_block_number last_block_number missing_block_range_count missing_block_count
block_number step count error_count shrunk import_id transaction_id)a
# Import environment specific config. This must remain at the bottom
# of this file so it overrides the configuration defined above.
import_config "#{config_env()}.exs"