
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.
Custom logger allows you to log you're debug information to an html file so you can view them in much more easier way. All you need to do is include the gem in the Gemfile and then use it directly CustomLogger.
CustomLogger is compatible with Ruby 1.9 and above. As for Rails 3.x and up. You should not be using or have Ruby 1.8 installed for obvious reasons.
Add this line to your application's Gemfile:
group :development, :test do
[...]
gem 'customlogger'
[...]
end
Keep in mind that "[...]" means that there may or may not be other gems there.
And then execute:
$ bundle
Or install it yourself as:
$ gem install customlogger
Custom Logger is very easy to use. Just use the module 'CustomLogger' anywhere and log the message in a nice friendly colorful html page view. All the logging follows pattern of message input first followed by optional title. Take a look at the examples below.
CustomLogger.error 'This is an error message'
CustomLogger.error('This is an error message', 'Error Title')
CustomLogger.warning 'This is a warning message'
CustomLogger.warning('This is a warning message', 'Warning Title')
CustomLogger.debug 'This is a debug message'
CustomLogger.debug('This is a debug message', 'Debug Title')
CustomLogger.info 'This is an info message'
CustomLogger.info('This is an info message', 'Info Title')
Keep in mind that raw means that no formatting is applied so if the output is 1000 characters horizontal without any line break then that is what you will see. Basically it is inside of a 'pre' html tag.
CustomLogger.raw 'This is a raw message'
CustomLogger.raw('This is a raw message', 'Raw Title')
CustomLogger supports ActiveRecord if you use ActiveRecord. To log ActiveRecord just use raw logger. For an example:
CustomLogger.raw(User.first, 'This is User.first')
If you want to add a gap in-between sets of outputs then this is what you are looking for.
CustomLogger.new_line
To clear all logs that are there in the html file
CustomLogger.clear
To auto clear all logs on EACH log
CustomLogger.auto_clear = true
To disable auto clear all logs on EACH log (default)
CustomLogger.auto_clear = true
You will find the log file in:
log/custom_logger.html
bundle exec rake spec
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that customlogger 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.