Mailinglist Archive: yast-devel (53 mails)

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


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"

I really like this and think it deserves putting a similar example
either directly into the main yast-ruby-bindings 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.


To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups