Socket
Book a DemoInstallSign in
Socket

lumberjack_mongo_device

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lumberjack_mongo_device

1.0.1
bundlerRubygems
Version published
Maintainers
1
Created
Source

= Lumberjack Mongo Device

This gem provides a logging device for the lumberjack gem that will log to a MongoDB collection.

MongoDB can make a good destination for centralized log data because it is fast, clients don't need to wait for confirmation that log messages are persisted, and it has a concept of capped collections which are fixed in size and will simply roll over and start writing from the beginning when they are full.

== Example Usage

require 'lumberjack_mongo_device'

Connect to mongodb on localhost:27017 and use the "log" collection in the "app" database.

The log collection will be created as a capped collection with a maximum size of 1GB.

device = Lumberjack::MongoDevice.new(:db => "app", :collection => "log", :size => 1024 ** 3) logger = Lumberjack::Logger.new(device) logger.info("Write me to MongoDB!")

See MongoDevice for more details.

FAQs

Package last updated on 24 Jun 2011

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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.