hex logo Hex
Packages Pricing Docs
Log In
Packages Pricing Docs Log In
Packages

logger_json

6.0.0
7.0.4 7.0.3 7.0.2 7.0.1 7.0.0 6.2.1 6.2.0 6.0.3 6.0.2 6.0.1 6.0.0 6.0.0-rc.4 6.0.0-rc.3 6.0.0-rc.2 6.0.0-rc.1 6.0.0-rc.0 5.1.4 5.1.3 5.1.2 5.1.1 5.1.0 5.0.0 4.3.0 4.2.0 4.1.0 4.0.0 3.3.0 3.2.0 3.1.2 3.1.1 3.1.0 3.0.3 3.0.2 3.0.1 3.0.0 2.0.1 2.0.0 1.3.0 1.2.1 1.2.0 1.1.0 1.0.1 1.0.0 0.5.0 0.4.0 0.3.0 0.2.0 0.1.0

This package includes a set of :logger formatters designed to output logs in JSON format. It is compatible with a variety of log management systems that support JSON, including Google Cloud Logging and Error Reporting, Datadog, ElasticSearch, LogStash, FileBeat, and Kibana.

HexDocs

Current section

Files

Jump to
Readme
48 Versions
4 Dependencies
11 Dependants
Files
Activity
Readme 48 Versions 4 Dependencies 11 Dependants Files Activity
logger_json lib logger_json formatter.ex
Raw

20 files

  • lib
    • logger_json
      • formatter
        • code.ex
        • datetime.ex
        • map_builder.ex
        • message.ex
        • metadata.ex
        • plug.ex
        • redactor_encoder.ex
      • formatters
        • basic.ex
        • datadog.ex
        • elastic.ex
        • google_cloud.ex
      • redactors
        • redact_keys.ex
      • ecto.ex
      • formatter.ex
      • plug.ex
      • redactor.ex
    • logger_json.ex
  • LICENSE.md
  • README.md
  • mix.exs

Package files

  • lib/logger_json.ex
  • lib/logger_json/ecto.ex
  • lib/logger_json/formatter.ex
  • lib/logger_json/formatter/code.ex
  • lib/logger_json/formatter/datetime.ex
  • lib/logger_json/formatter/map_builder.ex
  • lib/logger_json/formatter/message.ex
  • lib/logger_json/formatter/metadata.ex
  • lib/logger_json/formatter/plug.ex
  • lib/logger_json/formatter/redactor_encoder.ex
  • lib/logger_json/formatters/basic.ex
  • lib/logger_json/formatters/datadog.ex
  • lib/logger_json/formatters/elastic.ex
  • lib/logger_json/formatters/google_cloud.ex
  • lib/logger_json/plug.ex
  • lib/logger_json/redactor.ex
  • lib/logger_json/redactors/redact_keys.ex
  • LICENSE.md
  • mix.exs
  • README.md

lib/logger_json/formatter.ex

defmodule LoggerJSON.Formatter do
@type opts :: [
{:metadata, :all | {:all_except, [atom()]} | [atom()]}
| {:redactors, [{module(), term()}]}
| {atom(), term()}
]
@callback format(event :: :logger.log_event(), opts :: opts()) :: iodata()
end
hex logo Hex
About Blog Sponsors Status Advisories
Documentation FAQ Specifications Report Client Issue Report General Issue Report Security Issue Contact Support
Code of Conduct Terms of Service Privacy Policy Copyright Policy Dispute Policy

Copyright 2015. Six Colors AB.

Powered by the Erlang VM and the Elixir Programming Language

Search filters

Type any of these into the search box. They can be combined with free text which searches package names and descriptions.

Operator Description Example
name: Match package name. Supports * wildcards and repo/package form name:phx* or name:hexpm/phoenix
description: Full-text search of package descriptions description:auth
depends: Packages depending on a given package. Supports repo:package form depends:ecto or depends:hexpm:ecto
build_tool: Filter by build tool build_tool:mix
updated_after: Packages updated after an ISO8601 datetime updated_after:2025-01-01T00:00:00Z
extra: Match custom metadata (key,value). Nested keys are separated by commas extra:license,MIT

Wrap values in double quotes to include spaces, e.g. name:"my package".