lib/xezat.rb in xezat-0.1.1 vs lib/xezat.rb in xezat-0.1.2
- old
+ new
@@ -7,11 +7,14 @@
DATA_DIR = File.expand_path(File.join(ROOT_DIR, 'share', 'xezat'))
REPOSITORY_DIR = File.expand_path(File.join(DATA_DIR, 'repository'))
TEMPLATE_DIR = File.expand_path(File.join(DATA_DIR, 'template'))
INI_FILE = File.expand_path(File.join(Dir.home, '.xezat'))
- LOG = Logger.new(STDOUT)
- LOG.formatter = proc { |_severity, datetime, _progname, message|
+ class << self
+ attr_accessor :logger
+ end
+ Xezat.logger = Logger.new(STDOUT)
+ Xezat.logger.formatter = proc { |_severity, datetime, _progname, message|
"#{datetime}: #{message}\n"
}
class CygportProcessError < StandardError
end