Tizen 2.1 base
[external/device-mapper.git] / report-generators / lib / log.rb
1 # Copyright (C) 2010 Red Hat, Inc. All rights reserved.
2 #
3 # This copyrighted material is made available to anyone wishing to use,
4 # modify, copy, or redistribute it subject to the terms and conditions
5 # of the GNU General Public License v.2.
6 #
7 # You should have received a copy of the GNU General Public License
8 # along with this program; if not, write to the Free Software Foundation,
9 # Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
10
11 # Merely wraps the logger library with a bit of standard policy.
12 require 'logger'
13
14 module Log
15   $log = Logger.new(STDERR)
16
17   def init(io_)
18     $log = Logger.new(io_)
19   end
20 end
21
22 def fatal(*args)
23   $log.fatal(*args)
24 end
25
26 def error(*args)
27   $log.error(*args)
28 end
29
30 def info(*args)
31   $log.info(*args)
32 end
33
34 def warning(*args)
35   $log.warn(*args)
36 end
37
38 def debug(*args)
39   $log.debug(*args)
40 end