Skip to content

Commit

Permalink
Fix unclosed quote in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewDryga committed May 14, 2024
1 parent e31100d commit ff67f2c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/logger_json/ecto.ex
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ defmodule LoggerJSON.Ecto do
Attaching the telemetry handler to the `MyApp.Repo` events with the `:info` log level:
LoggerJSON.Ecto.attach("logger-json-queries, [:my_app, :repo, :query], :info)
LoggerJSON.Ecto.attach("logger-json-queries", [:my_app, :repo, :query], :info)
For more details on event and handler naming see
(`Ecto.Repo` documentation)[https://hexdocs.pm/ecto/Ecto.Repo.html#module-telemetry-events].
Expand Down
4 changes: 2 additions & 2 deletions lib/logger_json/plug.ex
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ defmodule LoggerJSON.Plug do
plug Plug.Telemetry, event_prefix: [:myapp, :plug]
# in your application.ex
LoggerJSON.Plug.attach("logger-json-requests, [:myapp, :plug, :stop], :info)
LoggerJSON.Plug.attach("logger-json-requests", [:myapp, :plug, :stop], :info)
To make plug broadcast those events see [`Plug.Telemetry`](https://hexdocs.pm/plug/Plug.Telemetry.html) documentation.
You can also attach to the `[:phoenix, :endpoint, :stop]` event to log request latency from Phoenix endpoints:
LoggerJSON.Plug.attach("logger-json-phoenix-requests, [:phoenix, :endpoint, :stop], :info)
LoggerJSON.Plug.attach("logger-json-phoenix-requests", [:phoenix, :endpoint, :stop], :info)
"""
def attach(name, event, level) do
:telemetry.attach(name, event, &telemetry_logging_handler/4, level)
Expand Down

0 comments on commit ff67f2c

Please sign in to comment.