class Logger
def info(progname = nil, &block)
See #add.
=== Return
program name (which you can do with #progname= as well).
You'll probably stick to the second form above, unless you want to provide a
logger.info { "User typed #{input}" }
# ...
logger.info "Waiting for input from user"
# ...
logger.info("MainApp") { "Received connection from #{ip}" }
=== Examples
are only called when the logger is configured to show them.
allows you to create potentially expensive logging messages that
the logger's level is sufficient to log the message. This
+block+:: Evaluates to the message to log. This is not evaluated unless
log message. The default can be set with #progname=.
+progname+:: In the block form, this is the #progname to use in the
+message+:: The message to log; does not need to be a String.
Log an +INFO+ message.
info(progname, &block)
info(message)
:call-seq:
def info(progname = nil, &block) add(INFO, nil, progname, &block) end