Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Logstash backend for the Elixir Logger

License

NotificationsYou must be signed in to change notification settings

marcelog/logger_logstash_backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

LoggerLogstashBackend

About

A backend for theElixir Loggerthat will send logs to theLogstash UDP input.

Supported options

  • host: String.t. The hostname or ip address where to send the logs.
  • port: Integer. The port number. Logstash should be listening with its UDPinputter.
  • metadata: Keyword.t. Extra fields to be added when sending the logs. These willbe merged with the metadata sent in every log message.
  • level: Atom. Minimum level for this backend.
  • type: String.t. Type of logs. Useful to filter in logstash.

Sample Logstash config

input {  udp {    codec => json    port => 10001    queue_size => 10000    workers => 10    type => default_log_type  }}output {  stdout {}  elasticsearch {    protocol => http  }}

Using it with Mix

To use it in your Mix projects, first add it as a dependency:

defdepsdo[{:logger_logstash_backend,"~> 3.0.0"}]end

Then run mix deps.get to install it.

Add logger and tzdata as applications:

defapplicationdo[applications:[:logger,:timex]]end

Configuration Examples

Runtime

Logger.add_backend{LoggerLogstashBackend,:debug}Logger.configure{LoggerLogstashBackend,:debug},host:"127.0.0.1",port:10001,level::debug,metadata:...

Application config

config:logger,backends:[{LoggerLogstashBackend,:error_log},:console]config:logger,:error_log,host:"some.host.com",port:10001,level::error,type:"my_type_of_app_or_node",metadata:[extra_fields:"go here"]

About

Logstash backend for the Elixir Logger

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp