On 02/04/2014 11:16 AM, Ladislav Slezak wrote:
Hi all,
another change in yast2-ruby-bindings-3.1.7 is a new Yast::Logger module which wraps Y2Logger mentioned in the previous mail.
The module provides standard Ruby logging way [1] for writing into y2log.
Example:
module Yast class Foo < Client include Yast::Logger
def foo # this will be logged into y2log using the usual y2log format
# Builtins.y2debug() replacement log.debug "debug" # Builtins.y2milestone() replacement log.info "info" # Builtins.y2error() replacement log.error "error" end end end
I really like this and think it deserves putting a similar example either directly into the main yast-ruby-bindings README.md or at least on top of the y2logger.rb file as a 'real world' example. This will be useful to every yast developer, even more if it is easier to spot. vlado -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org