
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
This gem provides an IO like object, that can be used with any logging class (such as Ruby's native Logger). This object will save its input to a file, and allows:
This functionality supplement logging classes, allowing everything related to logging management, to be done within Ruby, without relying on external tools (such as logrotate).
gem install evanescent
This gem uses Semantic Versioning, so you should add to your .gemspec something like:
s.add_runtime_dependency 'evanescent', '~> 1.0'
Please, always check latest available version!
require 'evanescent'
require 'timecop'
logger = Evanescent.logger(
path: 'test.log',
rotation: :hourly,
keep: '2 hours',
)
logger.class # => Logger
# Within first hour, only test.log will exist.
Timecop.freeze(Time.now)
logger.info 'first message'
Dir.entries('.') # => [".", "..", "test.log"]
# One hour later, rotation and compression will happen.
Timecop.freeze(Time.now + 3600)
logger.info 'second message'
Dir.entries('.') # => [".", "..", "test.log", "test.log.2015122315.gz"]
# Another hour later, we'll have 2 compressed files.
Timecop.freeze(Time.now + 3600)
logger.info 'third message'
Dir.entries('.') # => [".", "..", "test.log", "test.log.2015122315.gz", "test.log.2015122316.gz"]
# At last, after keep period, old compressed files are purged.
Timecop.freeze(Time.now + 3600)
logger.info 'fourth message'
Dir.entries('.') # => [".", "..", "test.log", "test.log.2015122316.gz", "test.log.2015122317.gz"]
Evanescent is an IO like object: it responds to :write and :close:
io = Evanescent.new(
path: 'test.log',
rotation: :hourly,
keep: '2 hours',
)
io.write('message') # writes message to test.log
io.close
Although Evanescent supports mult-thread operation, inter-process locking is not currently implemented, and behavior is unpredicted in this situation.
FAQs
Unknown package
We found that evanescent 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
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.