File: 005.1-repository.rb

package info (click to toggle)
ruby-yell 2.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 272 kB
  • sloc: ruby: 1,125; makefile: 2
file content (21 lines) | stat: -rw-r--r-- 388 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# encoding: utf-8

require_relative '../lib/yell'

puts <<-EOS

# You can add a logger to the global repository.
#
# create a logger named 'mylog' that logs to stdout
Yell.new :stdout, name: 'mylog'

# Later in the code, you can get your logger back
Yell['mylog'].info "Hello World!"


EOS

puts "=== actual example ==="
Yell.new :stdout, name: 'mylog'
Yell['mylog'].info "Hello World!"