Project

General

Profile

Bug #6738 ยป lib_logger_rdoc_default_time_format.patch

patch 2 - stomar (Marcus Stollsteimer), 07/16/2012 03:00 AM

View differences:

lib/logger.rb (Arbeitskopie)
178 178
# default.  The default format and a sample are shown below:
179 179
#
180 180
# Log format:
181
#   SeverityID, [Date Time uSec #pid] SeverityLabel -- ProgName: message
181
#   SeverityID, [DateTime #pid] SeverityLabel -- ProgName: message
182 182
#
183 183
# Log sample:
184
#   I, [Wed Mar 03 02:34:24 JST 1999 895701 #19074]  INFO -- Main: info.
184
#   I, [1999-03-03T02:34:24.895701 #19074]  INFO -- Main: info.
185 185
#
186 186
# You may change the date and time format via #datetime_format=.
187 187
#
188 188
#   logger.datetime_format = '%Y-%m-%d %H:%M:%S'
189
#         # e.g. "2004-01-03 00:54:26"
189
#         # e.g. '2004-01-03 00:54:26'
190 190
#
191 191
# Or, you may change the overall format via the #formatter= method.
192 192
#
193 193
#   logger.formatter = proc do |severity, datetime, progname, msg|
194 194
#     "#{datetime}: #{msg}\n"
195 195
#   end
196
#   # e.g. 'Thu Sep 22 08:51:08 GMT+9:00 2005: hello world'
196
#   # e.g. '2005-09-22 08:51:08 +0900: hello world'
197 197
#
198 198
class Logger
199 199
  VERSION = "1.2.7"