Module: Pwrake::Log
Constant Summary
Pwrake::Logger::Severity::DEBUG, Pwrake::Logger::Severity::ERROR, Pwrake::Logger::Severity::FATAL, Pwrake::Logger::Severity::INFO, Pwrake::Logger::Severity::UNKNOWN, Pwrake::Logger::Severity::WARN
Class Method Summary
collapse
Class Method Details
.close ⇒ Object
113
114
115
|
# File 'lib/pwrake/logger.rb', line 113
def close
LOGGER.close
end
|
.debug(s) ⇒ Object
121
122
123
|
# File 'lib/pwrake/logger.rb', line 121
def debug(s)
LOGGER.debug(s)
end
|
.fmt_time(t) ⇒ Object
137
138
139
|
# File 'lib/pwrake/logger.rb', line 137
def fmt_time(t)
t.strftime("%Y-%m-%dT%H:%M:%S.%%06d") % t.usec
end
|
.info(s) ⇒ Object
117
118
119
|
# File 'lib/pwrake/logger.rb', line 117
def info(s)
LOGGER.info(s)
end
|
.level ⇒ Object
129
130
131
|
# File 'lib/pwrake/logger.rb', line 129
def level
LOGGER.level
end
|
.level=(x) ⇒ Object
133
134
135
|
# File 'lib/pwrake/logger.rb', line 133
def level=(x)
LOGGER.level = x
end
|
.open(file) ⇒ Object
109
110
111
|
# File 'lib/pwrake/logger.rb', line 109
def open(file)
LOGGER.open(file)
end
|
.stderr_puts(message) ⇒ Object
145
146
147
148
149
|
# File 'lib/pwrake/logger.rb', line 145
def stderr_puts(message)
LOCK.synchronize do
$stderr.write(message+"\n")
end
end
|
.stdout_puts(message) ⇒ Object
151
152
153
154
155
|
# File 'lib/pwrake/logger.rb', line 151
def stdout_puts(message)
LOCK.synchronize do
$stdout.write(message+"\n")
end
end
|
.timer(prefix, *args) ⇒ Object
141
142
143
|
# File 'lib/pwrake/logger.rb', line 141
def timer(prefix,*args)
Timer.new(prefix,*args)
end
|
.warn(s) ⇒ Object
125
126
127
|
# File 'lib/pwrake/logger.rb', line 125
def warn(s)
LOGGER.warn(s)
end
|