
Security News
CISA’s 2025 SBOM Guidance Adds Hashes, Licenses, Tool Metadata, and Context
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
= Footprint Rack Application Logging Tools
{}[http://badge.fury.io/rb/footprint-log]
{
}[https://travis-ci.org/ipuiu/footprint-log]
{
}[https://gemnasium.com/ipuiu/footprint-log]
{
}[https://codeclimate.com/github/ipuiu/footprint-log]
{
}[https://coveralls.io/r/ipuiu/footprint-log?branch=master]
{
}[http://inch-ci.org/github/ipuiu/footprint-log]
== What is "Footprint" ?
Footprint was started by the need to have a simple and smart way to deal with the logs.
It is composed of:
require 'footprint/log' # some custom loggers.
require 'footprint/middleware' # middleware used to decorate Rack applications.
== How to use it ?
First you should add the gem to your Gemfile:
gem 'footprint-log'
=== Basic Usage
Let's say that we don't care about what logger we use, and we just wish a logger method in our app that acts like a logger instance.
In that case we can do something like this:
require 'sinatra'
require 'footprint/middleware'
class MyApp < Sinatra
use Footprint::Middleware
get '/' do
logger.info 'I can use logger method inside my route!'
end
end
=== Advanced Usage
Let's say that we care about what logger we use, and we also wish a logger method in our app that acts like a logger instance.
Let's assume we want to use a instance of the Logger class, initialized with log_device as STDOUT.
In that case we can do something like this:
require 'sinatra'
require 'footprint/middleware'
class MyApp < Sinatra
use Footprint::Middleware do
set Logger, STDOUT
end
get '/' do
logger.info 'I can use a instance of Logger class, initialized with STDOUT option by calling the logger method inside my route!'
end
end
Let's assume we want to use the following custom Logger class, initialized with log_device as STDOUT and level as 1 (that is INFO level).
class MyAwesomeLogger < Logger
def initialize logdev, level
super logdev, shift_age = 0, shift_size = 1048576
@level = level
end
end
In that case we can do something like this:
require 'sinatra'
require 'footprint/middleware'
class MyApp < Sinatra
use Footprint::Middleware do
set MyAwesomeLogger, STDOUT, 1
end
get '/' do
logger.info 'I can use a instance of MyAwesomeLogger class, initialized with STDOUT, 1 option by calling the logger method inside my route!'
end
end
== Contributing to Footprint
== Copyright
Copyright (c) 2014 Puiu Ionut. See LICENSE.txt for further details.
FAQs
Unknown package
We found that footprint-log demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.