
Security News
Meet Socket at Black Hat Europe and BSides London 2025
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.
If a tree falls in a forest and no one is around to hear it, does it make a sound?
Treefell is a minimalist debug-logging library for ruby. It uses the DEBUG environment variable to determine which debug messages are logged and which are suppressed.
This project was inspired by visionmedia's debug library for nodejs.
Add this line to your application's Gemfile:
gem 'treefell'
And then execute:
$ bundle
Or install it yourself as:
$ gem install treefell
Take the ruby program:
#!/usr/bin/env ruby
require 'treefell'
foo_debug = Treefell['foo']
foo_debug.puts 'too funky in here'
bar_debug = Treefell['bar']
bar_debug.puts 'you got that right'
baz_debug = Treefell['baz']
baz_debug.puts 'say it again'
Each call to Treefell['...'] instantiates a DebugLogger for the provided
namespace (e.g. foo, bar, baz).
By default no debug log statements are displayed:
> ruby program.rb
You can tell it to display all messages with the wildcard *:

Here's how to display messages for one specific debugging namespace:

To display messages from multiple namespaces use a comma-separated list of namespaces:

Every namespace gets a color associated with it to aide in the visual parsing
of the output. Also DebugLogger(s) are cached per namespace so regardless
of when you refer to the namespace it will always have the same color
associated with it.
E.g.
foo_debug = Treefell['foo']
other_foo_debug = Treefell['foo']
foo_debug.eql?(other_foo_debug) # => true
By default all messages are written to STDOUT. You can change this by
instantiating a debug logger using the debug method, e.g.:
foo_debug = Treefell.debug('foo', io: some_io)
foo_debug.puts 'Get up offa that thing, and dance till you feel better'
git checkout -b my-new-feature)git commit -am 'Add some feature')git push origin my-new-feature)FAQs
Unknown package
We found that treefell 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
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.