File: simple.rb

package info (click to toggle)
ruby-logging 2.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, sid, trixie
  • size: 660 kB
  • sloc: ruby: 6,139; sh: 11; makefile: 2
file content (17 lines) | stat: -rw-r--r-- 480 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# :stopdoc:
#
# Logging provides a simple, default logger configured in the same manner as
# the default Ruby Logger class -- i.e. the output of the two will be the
# same. All log messages at "warn" or higher are printed to STDOUT; any
# message below the "warn" level are discarded.
#

  require 'logging'

  log = Logging.logger(STDOUT)
  log.level = :warn

  log.debug "this debug message will not be output by the logger"
  log.warn "this is your last warning"

# :startdoc: