New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

lite_logger

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lite_logger

  • 0.1.6
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

LiteLogger

LiteLogger is a lightweight logging solution for Ruby applications, providing customizable log levels, formats, and destinations.

Status

Gem Version

Installation

Add this line to your application's Gemfile:

gem 'lite_logger'

And then run:

bundle install

Or install it manually with:

gem install lite_logger

Usage

Example

In a Ruby class:
# Require the gem
require 'lite_logger'

class MyClass
  def initialize
    # Initialize the logger
    @logger = LiteLogger.new
  end

  def run
    @logger.debug('This is a debug message')
    @logger.info('This is an info message')
    @logger.warn('This is a warning message')
    @logger.error('This is an error message')
    @logger.fatal('This is a fatal message')

    # Method logic here
  end
end
Logging to a file
require 'lite_logger'

@logger = LiteLogger::Logger.new
@logger.destination = './application.log'
@logger.info('Application started!')

Output:

2024-07-10 18:58:07 -0300 [INFO] Application started!

Contributing

Bug reports and pull requests are welcome: https://github.com/dmferrari/lite_logger/pulls.

License

License This little gem is available as open-source under the terms of the MIT License (see the LICENSE file in the project root for details).

FAQs

Package last updated on 10 Jul 2024

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc