On 4.2.2014 11:16, 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
Thank you, Ladislav! This will help us to push conversion from RYCP to Ruby :) Please check for Builtins.*() versus log.* in code reviews and suggest using the new approach if possible (link to docu / example) would be lovely in that case. Bye Lukas -- Lukas Ocilka, Yast TL, Cloud & Systems Management Department SUSE LINUX s.r.o., Praha -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org