Skip to content

Add @doc :since to Logger.{get, put, delete}_process_level/2 #13508

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/logger/lib/logger.ex
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,7 @@ defmodule Logger do
This will take priority over the primary level set, so it can be
used to increase or decrease verbosity of some parts of the running system.
"""
@doc since: "1.15.0"
@spec put_process_level(pid(), level() | :all | :none) :: :ok
def put_process_level(pid, level) when pid == self() do
Process.put(@metadata, elixir_level_to_erlang_level(level))
Expand All @@ -792,6 +793,7 @@ defmodule Logger do
The returned value will be the effective value used. If no value
was set for a given process, then `nil` is returned.
"""
@doc since: "1.15.0"
@spec get_process_level(pid) :: level() | :all | :none | nil
def get_process_level(pid) when pid == self() do
Process.get(@metadata, nil)
Expand All @@ -802,6 +804,7 @@ defmodule Logger do

Currently the only accepted PID is `self()`.
"""
@doc since: "1.15.0"
@spec delete_process_level(pid()) :: :ok
def delete_process_level(pid) when pid == self() do
Process.delete(@metadata)
Expand Down