Skip to content

pma/logger_syslog_backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logger Syslog Backend

Elixir Logger backend for local syslog (and rfc3164).

Requires Erlang 19 since it writes directly to the local syslog Unix Socket (/dev/log).

Installation

  1. Add logger_syslog_backend to your list of dependencies in mix.exs:
```elixir
def deps do
  [{:logger_syslog_backend, "~> 1.0"}]
end
```
  1. Configure the Logger backend in config/config.exs:
```elixir
config :logger,
  backends: [:console, {LoggerSyslogBackend, :syslog}]

config :logger, :syslog,
  app_id: :my_app,  # defaults to the application of the caller module
  buffer: 10000,    # allocate a larger sending buffer. This should be
                    # bigger than Logger's truncate with default 8192
  path: "/dev/log"  # defaults to "/dev/log" in Linux,
                    # "/var/run/syslog" in macOS
                    # "/var/run/log" in FreeBSD

```

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages