All Projects → rocketjob → Semantic_logger

rocketjob / Semantic_logger

Licence: apache-2.0
Semantic Logger is a feature rich logging framework, and replacement for existing Ruby & Rails loggers.

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Semantic logger

Punt
Punt is a tiny and lightweight daemon which helps ship logs to Elasticsearch.
Stars: ✭ 98 (-83.96%)
Mutual labels:  elasticsearch, logging, syslog
Rsyslog
a Rocket-fast SYStem for LOG processing
Stars: ✭ 1,385 (+126.68%)
Mutual labels:  elasticsearch, logging, syslog
Logtrail
Kibana plugin to view, search & live tail log events
Stars: ✭ 1,343 (+119.8%)
Mutual labels:  elasticsearch, logging, syslog
Json Logging Python
Python logging library to emit JSON log that can be easily indexed and searchable by logging infrastructure such as ELK, EFK, AWS Cloudwatch, GCP Stackdriver
Stars: ✭ 143 (-76.6%)
Mutual labels:  elasticsearch, logging
Awesome Cloud Security
Curated list of awesome cloud security blogs, podcasts, standards, projects, and examples.
Stars: ✭ 98 (-83.96%)
Mutual labels:  elasticsearch, logging
Elogrus
Logrus Hook for ElasticSearch
Stars: ✭ 130 (-78.72%)
Mutual labels:  elasticsearch, logging
Systemdlogger
Exports systemd logs to an external service, eg cloudwatch, elasticsearch
Stars: ✭ 91 (-85.11%)
Mutual labels:  elasticsearch, logging
Tlog
Terminal I/O logger
Stars: ✭ 170 (-72.18%)
Mutual labels:  elasticsearch, syslog
Frostmourne
frostmourne是基于Elasticsearch, InfluxDB数据,Mysql数据的监控,报警,分析系统. Monitor & alert & alarm & analyze for Elasticsearch && InfluxDB Log Data。主要使用springboot2 + vue-element-admin。 https://frostmourne-demo.github.io/
Stars: ✭ 166 (-72.83%)
Mutual labels:  elasticsearch, logging
Flowgger
A fast data collector in Rust
Stars: ✭ 606 (-0.82%)
Mutual labels:  logging, syslog
Console
OS X console application.
Stars: ✭ 298 (-51.23%)
Mutual labels:  logging, syslog
Docker Elastic
Deploy Elastic stack in a Docker Swarm cluster. Ship application logs and metrics using beats & GELF plugin to Elasticsearch
Stars: ✭ 202 (-66.94%)
Mutual labels:  elasticsearch, logging
Analog
PHP logging library that is highly extendable and simple to use.
Stars: ✭ 314 (-48.61%)
Mutual labels:  logging, syslog
Elk Hole
elasticsearch, logstash and kibana configuration for pi-hole visualiziation
Stars: ✭ 136 (-77.74%)
Mutual labels:  elasticsearch, logging
Go Syslog
Blazing fast syslog parser
Stars: ✭ 370 (-39.44%)
Mutual labels:  logging, syslog
Exceptionless
Exceptionless server and jobs
Stars: ✭ 2,107 (+244.84%)
Mutual labels:  elasticsearch, logging
Wp Rest Api Log
WordPress plugin for logging REST API requests and responses
Stars: ✭ 58 (-90.51%)
Mutual labels:  elasticsearch, logging
Terraform Modules
Reusable Terraform modules
Stars: ✭ 63 (-89.69%)
Mutual labels:  elasticsearch, logging
Log4net.elasticsearch
log4net appender to ElasticSearch
Stars: ✭ 202 (-66.94%)
Mutual labels:  elasticsearch, logging
Sigma
Generic Signature Format for SIEM Systems
Stars: ✭ 4,418 (+623.08%)
Mutual labels:  elasticsearch, logging

Semantic Logger

Gem Version Build Status Downloads License Gitter chat

Semantic Logger is a feature rich logging framework, and replacement for existing Ruby & Rails loggers.

Documentation

Semantic Logger Guide

Reference Documentation

Upgrading to Semantic Logger v4.4

With some forking frameworks it is necessary to call reopen after the fork. With v4.4 the workaround for Ruby 2.5 crashes is no longer needed. I.e. Please remove the following line if being called anywhere:

SemanticLogger::Processor.instance.instance_variable_set(:@queue, Queue.new)

Logging Destinations

Logging to the following destinations are all supported "out-of-the-box":

  • File
  • Screen
  • ElasticSearch. (Use with Kibana for Dashboards and Visualizations)
  • Graylog
  • BugSnag
  • NewRelic
  • Splunk
  • MongoDB
  • Honeybadger
  • Sentry
  • HTTP
  • TCP
  • UDP
  • Syslog
  • Add any existing Ruby logger as another destination.
  • Roll-your-own

Semantic Logger is capable of logging thousands of lines per second without slowing down the application. Traditional logging systems make the application wait while the log information is being saved. Semantic Logger avoids this slowdown by pushing log events to an in-memory queue that is serviced by a separate thread that only handles saving log information to multiple destinations / appenders.

Rails

When running Rails, use rails_semantic_logger instead of Semantic Logger directly since it will automatically replace the Rails default logger with Semantic Logger.

Rocket Job

Checkout the sister project Rocket Job: Ruby's missing batch system.

Fully supports Semantic Logger when running jobs in the background. Complete support for job metrics sent via Semantic Logger to your favorite dashboards.

Optional Dependencies

The following gems are only required when their corresponding appenders are being used, and are therefore not automatically included by this gem:

  • Bugsnag Appender: gem 'bugsnag'
  • MongoDB Appender: gem 'mongo' 1.9.2 or above
  • NewRelic Appender: gem 'newrelic_rpm'
  • Syslog Appender: gem 'syslog_protocol' 0.9.2 or above
  • Syslog Appender to a remote syslogng server over TCP or UDP: gem 'net_tcp_client'
  • Splunk Appender: gem 'splunk-sdk-ruby'
  • Elasticsearch Appender: gem 'elasticsearch'
  • Kafka Appender: gem 'ruby-kafka'

V4 Upgrade notes

The following changes need to be made when upgrading to V4:

  • Ruby V2.3 / JRuby V9.1 is now the minimum runtime version.
  • Replace calls to Logger#with_payload with SemanticLogger.named_tagged.
  • Replace calls to Logger#payload with SemanticLogger.named_tags.
  • MongoDB Appender requires Mongo Ruby Client V2 or greater.
  • Appenders now write payload data in a seperate :payload tag instead of mixing them directly into the root elements to avoid name clashes.

As a result any calls like the following:

logger.debug foo: 'foo', bar: 'bar'

Must be replaced with the following in v4:

logger.debug payload: {foo: 'foo', bar: 'bar'}

Similarly, for measure blocks:

logger.measure_info('How long is the sleep', foo: 'foo', bar: 'bar') { sleep 1 } 

Must be replaced with the following in v4:

logger.measure_info('How long is the sleep', payload: {foo: 'foo', bar: 'bar'}) { sleep 1 } 

The common log call has not changed, and the payload is still logged directly:

logger.debug('log this', foo: 'foo', bar: 'bar')

Install

gem install semantic_logger

To configure a stand-alone application for Semantic Logger:

require 'semantic_logger'

# Set the global default log level
SemanticLogger.default_level = :trace

# Log to a file, and use the colorized formatter
SemanticLogger.add_appender(file_name: 'development.log', formatter: :color)

If running rails, see: Semantic Logger Rails

Author

Reid Morrison

Contributors

Versioning

This project uses Semantic Versioning.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].