Files
news.gitea.happylizard.me/bin/gems/yell-2.2.2/examples/003.4-formatting-on-your-own.rb
T
pizza2d1 4cee170d66
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 9s
Add bin and edit workflow
2026-09-16 13:11:16 -06:00

22 lines
541 B
Ruby

# encoding: utf-8
require_relative '../lib/yell'
puts <<-EOS
# The extended formatting string looks like: %d [%5L] %p %h : %m.
logger = Yell.new STDOUT, format: "[%f:%n in `%M'] %m", trace: true
logger.info "Hello World!"
#=> [003.4-formatting-on-your-own.rb:20 in `<main>'] Hello World!
# ^ ^ ^ ^
# filename line method message
EOS
puts "=== actual example ==="
logger = Yell.new STDOUT, format: "[%f:%n in `%M'] %m", trace: true
logger.info "Hello World!"