All Projects → reidmorrison → semantic_logger

reidmorrison / semantic_logger

Licence: Apache-2.0 license
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

splunk-connect-for-syslog
Splunk Connect for Syslog
Stars: ✭ 111 (-84.79%)
Mutual labels:  splunk, syslog
aixlog
Header-only C++ logging library
Stars: ✭ 95 (-86.99%)
Mutual labels:  syslog
bugsnag-vue
[DEPRECATED] This package now lives within the monorepo for our Universal JS notifier "@bugsnag/js" • https://github.com/bugsnag/bugsnag-js
Stars: ✭ 26 (-96.44%)
Mutual labels:  bugsnag
nsyslog-parser
Syslog Parser. Accepts RFC 3164 (BSD) and RFC 5424 formats
Stars: ✭ 14 (-98.08%)
Mutual labels:  syslog
rfc5424-logging-handler
An RFC5424-Compliant Syslog Handler for the Python Logging Framework
Stars: ✭ 42 (-94.25%)
Mutual labels:  syslog
rkubelog
Send k8s Logs to Papertrail and Loggly Without DaemonSets (for Nodeless Clusters)
Stars: ✭ 15 (-97.95%)
Mutual labels:  syslog
TA-Sysmon-deploy
Deploy and maintain Symon through the Splunk Deployment Sever
Stars: ✭ 31 (-95.75%)
Mutual labels:  splunk
log4cl
Common Lisp logging framework, modeled after Log4J
Stars: ✭ 62 (-91.51%)
Mutual labels:  syslog
splunk modinput prometheus
A Splunk modular input for ingesting Prometheus metrics
Stars: ✭ 40 (-94.52%)
Mutual labels:  splunk
evtx2json
A tool to convert Windows evtx files (Windows Event Log Files) into JSON format and log to Splunk (optional) using HTTP Event Collector.
Stars: ✭ 38 (-94.79%)
Mutual labels:  splunk
Posh-SYSLOG
Send SYSLOG messages from PowerShell
Stars: ✭ 85 (-88.36%)
Mutual labels:  syslog
TA ETW
Splunk Technology Add-On (TA) for collecting ETW events from Windows systems
Stars: ✭ 17 (-97.67%)
Mutual labels:  splunk
TA-dmarc
Add-on for ingesting DMARC aggregate reports into Splunk
Stars: ✭ 14 (-98.08%)
Mutual labels:  splunk
WPWatcher
Wordpress Watcher is a wrapper for WPScan that manages scans on multiple sites and reports by email and/or syslog. Schedule scans and get notified when vulnerabilities, outdated plugins and other risks are found.
Stars: ✭ 34 (-95.34%)
Mutual labels:  syslog
splunk-connect-for-ethereum
Splunk Connect for Ethereum
Stars: ✭ 50 (-93.15%)
Mutual labels:  splunk
bugsnag-java
Bugsnag error reporting for Java.
Stars: ✭ 51 (-93.01%)
Mutual labels:  bugsnag
ex syslogger
ExSyslogger is an Elixir Logger custom backend to syslog.
Stars: ✭ 13 (-98.22%)
Mutual labels:  syslog
SplunkScriplets
Various Splunk Scripts and applets, all in one place
Stars: ✭ 24 (-96.71%)
Mutual labels:  splunk
napalm-logs
Cross-vendor normalisation for network syslog messages, following the OpenConfig and IETF YANG models
Stars: ✭ 131 (-82.05%)
Mutual labels:  syslog
datastation
App to easily query, script, and visualize data from every database, file, and API.
Stars: ✭ 2,519 (+245.07%)
Mutual labels:  syslog

Semantic Logger

Gem Version Build Status Downloads License

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

Documentation

Semantic Logger Guide

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 (both with legacy sentry-raven and modern sentry-ruby gem)
  • 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'
  • Legacy Sentry Appender: gem 'sentry-raven' (deprecated)
  • Sentry Appender: gem 'sentry-ruby'

Upgrading to Semantic Logger v4.9

These changes should not be noticeable by the majority of users of Semantic Logger, since they are to the internal API. It is possible that advanced users may be using these internal API's directly.

This does not affect any calls to the public api SemanticLogger.add_appender.

File and IO are now separate appenders. When creating the File appender explicitly, its arguments have changed. For example, when requesting an IO stream, it needs to be changed from:

SemanticLogger::Appender::File.new(io: $stderr)

to:

SemanticLogger::Appender::IO.new($stderr)

Additionally, this needs to be changed from:

SemanticLogger::Appender::File.new(file_name: "file.log")

to:

SemanticLogger::Appender::File.new("file.log")

Rails Semantic Logger, if used, needs to be upgraded to v4.9 when upgrading to Semantic Logger v4.9.

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)

Upgrading to Semantic Logger v4.0

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].