Mailinglist Archive: yast-devel (53 mails)

< Previous Next >
Re: [yast-devel] [RFC] make Builtins.y2milestone(), y2...() obsolete?
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.


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 "info"
# Builtins.y2error() replacement
log.error "error"

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.



Lukas Ocilka, Yast TL, Cloud & Systems Management Department
SUSE LINUX s.r.o., Praha
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >