diff options
author | Vitor Oliveira <vbrazo@gmail.com> | 2021-08-26 09:53:46 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-26 18:53:46 +0200 |
commit | db9f1aa9b20ace0be110fc0f656f6c38deb905fe (patch) | |
tree | 7dda813db1c788f317fedf2f99c9461b9ddb73f4 /lib/logger | |
parent | 7ef8dbadc0a8ab9452e4849c904e611ea0e70108 (diff) | |
download | elixir-db9f1aa9b20ace0be110fc0f656f6c38deb905fe.tar.gz |
Fix minor issues in Logger docs (#11212)
Diffstat (limited to 'lib/logger')
-rw-r--r-- | lib/logger/lib/logger.ex | 18 | ||||
-rw-r--r-- | lib/logger/lib/logger/app.ex | 2 |
2 files changed, 10 insertions, 10 deletions
diff --git a/lib/logger/lib/logger.ex b/lib/logger/lib/logger.ex index 948fb8eaf..f4fe4f37d 100644 --- a/lib/logger/lib/logger.ex +++ b/lib/logger/lib/logger.ex @@ -65,7 +65,7 @@ defmodule Logger do Whenever a message is logged, additional information can be given via metadata. Each log operation, such as `Logger.info/2`, allows - metadata to be given as argument. + metadata to be given as an argument. Furthermore, metadata can be set per process with `Logger.metadata/1`. @@ -441,7 +441,7 @@ defmodule Logger do @compile {:inline, enabled?: 1} @doc """ - Alters the current process metadata according the given keyword list. + Alters the current process metadata according to the given keyword list. This function will merge the given keyword list into the existing metadata, with the exception of setting a key to `nil`, which will remove that key @@ -510,7 +510,7 @@ defmodule Logger do end @doc """ - Returns whether the logging is enabled for given process. + Returns whether the logging is enabled for a given process. Currently the only accepted PID is `self()`. """ @@ -628,8 +628,8 @@ defmodule Logger do @doc """ Gets logging level for given module. - Returned value will be the effective value used. If no value - was set for given module, then it will not be present in + The returned value will be the effective value used. If no value + was set for a given module, then it will not be present in the returned list. """ @doc since: "1.11.0" @@ -637,21 +637,21 @@ defmodule Logger do defdelegate get_module_level(mod), to: :logger @doc """ - Deletes logging level for given module to primary level. + Deletes logging level for a given module to primary level. """ @doc since: "1.11.0" @spec delete_module_level(module() | [module()]) :: :ok defdelegate delete_module_level(module), to: :logger, as: :unset_module_level @doc """ - Deletes logging level for all modules to primary level + Deletes logging level for all modules to primary level. """ @doc since: "1.11.0" @spec delete_all_module_levels() :: :ok defdelegate delete_all_module_levels(), to: :logger, as: :unset_module_level @doc """ - Puts logging level for modules in given application. + Puts logging level for modules in a given application. This will take priority over the primary level set, so it can be used to increase or decrease verbosity of some parts of the project. @@ -665,7 +665,7 @@ defmodule Logger do defdelegate put_application_level(appname, level), to: :logger, as: :set_application_level @doc """ - Deletes logging level for all modules in given application to primary level + Deletes logging level for all modules in given application to primary level. Equivalent of: diff --git a/lib/logger/lib/logger/app.ex b/lib/logger/lib/logger/app.ex index bb6584a89..e53dd1b21 100644 --- a/lib/logger/lib/logger/app.ex +++ b/lib/logger/lib/logger/app.ex @@ -92,7 +92,7 @@ defmodule Logger.App do # in case of mismatches. # # If it is not set, we revert Erlang's kernel to debug, if it - # has its default value, otherwise we keep it as is. + # has its default value, otherwise, we keep it as is. case Application.fetch_env(:logger, :level) do {:ok, app_level} -> level = Logger.Handler.elixir_level_to_erlang_level(app_level) |