module GLib::Log - glib2-2.2.0 Documentation

# module GLib::Log

### Constants

DOMAIN
LEVELS

### Public Instance Methods

critical(str) click to toggle source

    # File lib/glib2.rb, line 175
    def critical(str)
      log(DOMAIN, LEVEL_CRITICAL, caller(1)[0] << ": " << str)
    end

error(str) click to toggle source

    # File lib/glib2.rb, line 169
    def error(str)
      log(DOMAIN, LEVEL_ERROR, caller(1)[0] << ": " << str)
    end

message(str) click to toggle source

    # File lib/glib2.rb, line 172
    def message(str)
      log(DOMAIN, LEVEL_MESSAGE, caller(1)[0] << ": " << str)
    end

set_log_domain(domain) click to toggle source

    # File lib/glib2.rb, line 182
    def set_log_domain(domain)
      level = GLib::Log::LEVEL_MASK
      if $DEBUG
        level = 255
      elsif $VERBOSE
        level = 127
      end
      GLib::Log.set_handler(domain, level)
    end

warning(str) click to toggle source

    # File lib/glib2.rb, line 178
    def warning(str)
      log(DOMAIN,  LEVEL_WARNING, caller(1)[0] << ": " << str)
    end