Skip to content
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
5 changes: 4 additions & 1 deletion lib/logflare/utils/logger_metadata.ex
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
defmodule Logflare.Utils.LoggerMetadata do
@moduledoc false
@doc """
Executes the given function with the provided metadata set in the logger.
Restores original logger metadata after execution.
"""

@spec with_metadata(Keyword.t(), (-> term())) :: term()
def with_metadata(metadata, fun) when is_list(metadata) and is_function(fun, 0) do
Expand Down
Loading