module GLib::Log

Constants

DOMAIN
LEVELS

Public Instance Methods

critical(str) click to toggle source
# File lib/glib2.rb, line 170
def critical(str)
  log(DOMAIN, LEVEL_CRITICAL, caller(1)[0] << ": " << str)
end
error(str) click to toggle source
# File lib/glib2.rb, line 164
def error(str)
  log(DOMAIN, LEVEL_ERROR, caller(1)[0] << ": " << str)
end
message(str) click to toggle source
# File lib/glib2.rb, line 167
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 177
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 173
def warning(str)
  log(DOMAIN,  LEVEL_WARNING, caller(1)[0] << ": " << str)
end