Sha256: e2a6e5d8a1783e895ed38f5e3020713af0c99f65c8cc2d0b125a4274fc787234
Contents?: true
Size: 863 Bytes
Versions: 14
Compression:
Stored size: 863 Bytes
Contents
# frozen_string_literal: true # dbus/logger.rb - debug logging # # This file is part of the ruby-dbus project # Copyright (C) 2012 Martin Vidner # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License, version 2.1 as published by the Free Software Foundation. # See the file "COPYING" for the exact licensing terms. require "logger" module DBus # Get the logger for the DBus module. # The default one logs to STDERR, # with DEBUG if $DEBUG is set, otherwise INFO. def logger unless defined? @logger @logger = Logger.new($stderr) @logger.level = $DEBUG ? Logger::DEBUG : Logger::INFO end @logger end module_function :logger # Set the logger for the DBus module def logger=(logger) @logger = logger end module_function :logger= end
Version data entries
14 entries across 14 versions & 1 rubygems