🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

em_logger

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

em_logger

1.0.0
Rubygems
Version published
Maintainers
1
Created
Source

EventMachine Logger

EM::Logger is a simple async wrapper around the ruby logger class. It responds to all the log levels you are familiar with from existing loggers (info, debug, warn, etc.). The only difference is that it's instantiated by passing an existing logger in when initializing.

Getting started

  • Add SimpleCov to your Gemfile and bundle install:

    gem 'em_logger'
    
  • Require it in code and use:

    require 'eventmachine'
    require 'logger'
    require 'em_logger'
        
    logger = EM::Logger.new(Logger.new(STDOUT))
    
    EM.run do
      logger.debug('Wow!')
    
      EM.stop
    end
    
  • How does it work?

It pushes all your log requests into queue and the separate thread pops them and delegates to the standard Ruby logger.

Copyright (c) Valery Mayatsky. See LICENSE for details.

FAQs

Package last updated on 26 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts