ÿØÿà JFIF    ÿÛ „ ( %!1!%*+...983,7(-.- PK*] &formatter-i.rinu[U:RDoc::Attr[iI"formatter:ETI"Logger#formatter;TI"RW;T: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"FLogging formatter, as a +Proc+ that will take four arguments and ;TI"5return the formatted message. The arguments are:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I"+severity+;T; [o; ; [I"%The Severity of the log message.;To;;[I" +time+;T; [o; ; [I">A Time instance representing when the message was logged.;To;;[I"+progname+;T; [o; ; [I">The #progname configured, or passed to the logger method.;To;;[I" +msg+;T; [o; ; [I"HThe _Object_ the user passed to the log message; not necessarily a ;TI" String.;T@o; ; [I"JThe block should return an Object that can be written to the logging ;TI"Mdevice via +write+. The default formatter is used when no formatter is ;TI" set.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below0F@5I" Logger;TcRDoc::NormalClass0PK*]t%CCsev_threshold-i.rinu[U:RDoc::Attr[iI"sev_threshold:ETI"Logger#sev_threshold;TI"R;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"=Logging severity threshold (e.g. Logger::INFO).;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below0F@I" Logger;TcRDoc::NormalClass0PK*]  LogDevice/shift_log_age-i.rinu[U:RDoc::AnyMethod[iI"shift_log_age:ETI"$Logger::LogDevice#shift_log_age;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/logger/log_device.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"LogDevice;TcRDoc::NormalClass00PK*]<&LogDevice/check_shift_log-i.rinu[U:RDoc::AnyMethod[iI"check_shift_log:ETI"&Logger::LogDevice#check_shift_log;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/logger/log_device.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"LogDevice;TcRDoc::NormalClass00PK*]Ї@LogDevice/cdesc-LogDevice.rinu[U:RDoc::NormalClass[iI"LogDevice:ETI"Logger::LogDevice;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"&Device used for logging messages.;T: @fileI"lib/logger/log_device.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I"dev;TI"R;T: privateFI"lib/logger/log_device.rb;T[ I" filename;T@; F@[[[I" Period;To;;[; @; 0@[I"MonitorMixin;To;;[; @; 0@[[I" class;T[[: public[[:protected[[; [[I"new;T@[I" instance;T[[; [[;[[; [[I"add_log_header;T@[I"check_shift_log;T@[I" close;T@[I"create_logfile;T@[I"lock_shift_log;T@[I"open_logfile;T@[I" reopen;T@[I" set_dev;T@[I"shift_log_age;T@[I"shift_log_period;T@[I" write;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/logger/log_device.rb;TI" Logger;TcRDoc::NormalClassPK*]/LogDevice/add_log_header-i.rinu[U:RDoc::AnyMethod[iI"add_log_header:ETI"%Logger::LogDevice#add_log_header;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/logger/log_device.rb;T:0@omit_headings_from_table_of_contents_below000[I" (file);T@ FI"LogDevice;TcRDoc::NormalClass00PK*]Z/LogDevice/reopen-i.rinu[U:RDoc::AnyMethod[iI" reopen:ETI"Logger::LogDevice#reopen;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/logger/log_device.rb;T:0@omit_headings_from_table_of_contents_below000[I"(log = nil);T@ FI"LogDevice;TcRDoc::NormalClass00PK*]UKKLogDevice/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Logger::LogDevice::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/logger/log_device.rb;T:0@omit_headings_from_table_of_contents_below000[I"[(log = nil, shift_age: nil, shift_size: nil, shift_period_suffix: nil, binmode: false);T@ FI"LogDevice;TcRDoc::NormalClass00PK*] 5KLogDevice/shift_log_period-i.rinu[U:RDoc::AnyMethod[iI"shift_log_period:ETI"'Logger::LogDevice#shift_log_period;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/logger/log_device.rb;T:0@omit_headings_from_table_of_contents_below000[I"(period_end);T@ FI"LogDevice;TcRDoc::NormalClass00PK*]R6LogDevice/close-i.rinu[U:RDoc::AnyMethod[iI" close:ETI"Logger::LogDevice#close;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/logger/log_device.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"LogDevice;TcRDoc::NormalClass00PK*] yLogDevice/filename-i.rinu[U:RDoc::Attr[iI" filename:ETI"Logger::LogDevice#filename;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/logger/log_device.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Logger::LogDevice;TcRDoc::NormalClass0PK*]⳺LogDevice/create_logfile-i.rinu[U:RDoc::AnyMethod[iI"create_logfile:ETI"%Logger::LogDevice#create_logfile;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/logger/log_device.rb;T:0@omit_headings_from_table_of_contents_below000[I"(filename);T@ FI"LogDevice;TcRDoc::NormalClass00PK*]XLogDevice/write-i.rinu[U:RDoc::AnyMethod[iI" write:ETI"Logger::LogDevice#write;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/logger/log_device.rb;T:0@omit_headings_from_table_of_contents_below000[I"(message);T@ FI"LogDevice;TcRDoc::NormalClass00PK*]ALogDevice/set_dev-i.rinu[U:RDoc::AnyMethod[iI" set_dev:ETI"Logger::LogDevice#set_dev;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/logger/log_device.rb;T:0@omit_headings_from_table_of_contents_below000[I" (log);T@ FI"LogDevice;TcRDoc::NormalClass00PK*]VGLogDevice/open_logfile-i.rinu[U:RDoc::AnyMethod[iI"open_logfile:ETI"#Logger::LogDevice#open_logfile;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/logger/log_device.rb;T:0@omit_headings_from_table_of_contents_below000[I"(filename);T@ FI"LogDevice;TcRDoc::NormalClass00PK*][bLogDevice/dev-i.rinu[U:RDoc::Attr[iI"dev:ETI"Logger::LogDevice#dev;TI"R;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/logger/log_device.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Logger::LogDevice;TcRDoc::NormalClass0PK*]LogDevice/lock_shift_log-i.rinu[U:RDoc::AnyMethod[iI"lock_shift_log:ETI"%Logger::LogDevice#lock_shift_log;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/logger/log_device.rb;T:0@omit_headings_from_table_of_contents_below00I";T[I"();T@ FI"LogDevice;TcRDoc::NormalClass00PK*]aw\uu fatal%3f-i.rinu[U:RDoc::AnyMethod[iI" fatal?:ETI"Logger#fatal?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"YReturns +true+ if and only if the current severity level allows for the printing of ;TI"+FATAL+ messages.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Logger;TcRDoc::NormalClass00PK*]%%cdesc-Logger.rinu[U:RDoc::NormalClass[iI" Logger:ET@I" Object;To:RDoc::Markup::Document: @parts[ o;;[OS:RDoc::Markup::Heading: leveli: textI"Description;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"OThe Logger class provides a simple but sophisticated logging utility that ;TI"$you can use to output messages.;T@o; ;[I"RThe messages have associated levels, such as +INFO+ or +ERROR+ that indicate ;TI"Ptheir importance. You can then give the Logger a level, and only messages ;TI"-at that level or higher will be printed.;T@o; ;[I"The levels are:;T@o:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I"+UNKNOWN+;T;[o; ;[I"5An unknown message that should always be logged.;To;;[I" +FATAL+;T;[o; ;[I";An unhandleable error that results in a program crash.;To;;[I" +ERROR+;T;[o; ;[I""A handleable error condition.;To;;[I" +WARN+;T;[o; ;[I"A warning.;To;;[I" +INFO+;T;[o; ;[I"9Generic (useful) information about system operation.;To;;[I" +DEBUG+;T;[o; ;[I"*Low-level information for developers.;T@o; ;[ I"KFor instance, in a production system, you may have your Logger set to ;TI"+INFO+ or even +WARN+. ;TI"?When you are developing the system, however, you probably ;TI"Rwant to know about the program's internal state, and would set the Logger to ;TI" +DEBUG+.;T@o; ;[I"K*Note*: Logger does not escape or sanitize any messages passed to it. ;TI"PDevelopers should be aware of when potentially malicious data (user-input) ;TI"Ais passed to Logger, and manually escape the untrusted data:;T@o:RDoc::Markup::Verbatim;[I".logger.info("User-input: #{input.dump}") ;TI"+logger.info("User-input: %p" % input) ;T: @format0o; ;[I"3You can use #formatter= for escaping all data.;T@o;;[ I"0original_formatter = Logger::Formatter.new ;TI"Clogger.formatter = proc { |severity, datetime, progname, msg| ;TI"G original_formatter.call(severity, datetime, progname, msg.dump) ;TI"} ;TI"logger.info(input) ;T;0S; ; i; I" Example;T@o; ;[I"NThis creates a Logger that outputs to the standard output stream, with a ;TI"level of +WARN+:;T@o;;[I"require 'logger' ;TI" ;TI"!logger = Logger.new(STDOUT) ;TI"!logger.level = Logger::WARN ;TI" ;TI"$logger.debug("Created logger") ;TI"$logger.info("Program started") ;TI"#logger.warn("Nothing to do!") ;TI" ;TI""path = "a_non_existent_file" ;TI" ;TI" begin ;TI"$ File.foreach(path) do |line| ;TI") unless line =~ /^(\w+) = (.*)$/ ;TI"? logger.error("Line in wrong format: #{line.chomp}") ;TI" end ;TI" end ;TI"rescue => err ;TI"1 logger.fatal("Caught exception; exiting") ;TI" logger.fatal(err) ;TI" end ;T;0o; ;[I"OBecause the Logger's level is set to +WARN+, only the warning, error, and ;TI"Lfatal messages are recorded. The debug and info messages are silently ;TI"discarded.;T@S; ; i; I" Features;T@o; ;[ I"GThere are several interesting features that Logger provides, like ;TI"Hauto-rolling of log files, setting the format of log messages, and ;TI"Rspecifying a program name in conjunction with the message. The next section ;TI"+shows you how to achieve these things.;T@S; ; i; I" HOWTOs;T@S; ; i; I"How to create a logger;T@o; ;[I"LThe options below give you various choices, in more or less increasing ;TI"complexity.;T@o;;: NUMBER;[ o;;0;[o; ;[I":Create a logger which logs messages to STDERR/STDOUT.;T@o;;[I"!logger = Logger.new(STDERR) ;TI"!logger = Logger.new(STDOUT) ;T;0o;;0;[o; ;[I"?Create a logger for the file which has the specified name.;T@o;;[I"(logger = Logger.new('logfile.log') ;T;0o;;0;[o; ;[I",Create a logger for the specified file.;T@o;;[ I">file = File.open('foo.log', File::WRONLY | File::APPEND) ;TI"4# To create new logfile, add File::CREAT like: ;TI"N# file = File.open('foo.log', File::WRONLY | File::APPEND | File::CREAT) ;TI"logger = Logger.new(file) ;T;0o;;0;[o; ;[I"LCreate a logger which ages the logfile once it reaches a certain size. ;TI"GLeave 10 "old" log files where each file is about 1,024,000 bytes.;T@o;;[I"1logger = Logger.new('foo.log', 10, 1024000) ;T;0o;;0;[o; ;[I"ACreate a logger which ages the logfile daily/weekly/monthly.;T@o;;[I"-logger = Logger.new('foo.log', 'daily') ;TI".logger = Logger.new('foo.log', 'weekly') ;TI"/logger = Logger.new('foo.log', 'monthly') ;T;0S; ; i; I"How to log a message;T@o; ;[ I"ONotice the different methods (+fatal+, +error+, +info+) being used to log ;TI"Nmessages of various levels? Other methods in this family are +warn+ and ;TI"M+debug+. +add+ is used below to log a message of an arbitrary (perhaps ;TI"dynamic) level.;T@o;;;;[ o;;0;[o; ;[I"Message in a block.;T@o;;[I"2logger.fatal { "Argument 'foo' not given." } ;T;0o;;0;[o; ;[I"Message as a string.;T@o;;[I"/logger.error "Argument #{@foo} mismatch." ;T;0o;;0;[o; ;[I"With progname.;T@o;;[I"5logger.info('initialize') { "Initializing..." } ;T;0o;;0;[o; ;[I"With severity.;T@o;;[I"2logger.add(Logger::FATAL) { 'Fatal error!' } ;T;0o; ;[I"KThe block form allows you to create potentially complex log messages, ;TI"Cbut to delay their evaluation until and unless the message is ;TI"4logged. For example, if we have the following:;T@o;;[I"Jlogger.debug { "This is a " + potentially + " expensive operation" } ;T;0o; ;[I"RIf the logger's level is +INFO+ or higher, no debug messages will be logged, ;TI"Gand the entire block will not even be evaluated. Compare to this:;T@o;;[I"Glogger.debug("This is a " + potentially + " expensive operation") ;T;0o; ;[I"HHere, the string concatenation is done every time, even if the log ;TI"0level is not set to show the debug message.;T@S; ; i; I"How to close a logger;T@o;;[I"logger.close ;T;0S; ; i; I"Setting severity threshold;T@o;;;;[ o;;0;[o; ;[I"Original interface.;T@o;;[I")logger.sev_threshold = Logger::WARN ;T;0o;;0;[o; ;[I"+Log4r (somewhat) compatible interface.;T@o;;[I"!logger.level = Logger::INFO ;TI" ;TI"5# DEBUG < INFO < WARN < ERROR < FATAL < UNKNOWN ;T;0o;;0;[o; ;[I"(Symbol or String (case insensitive);T@o;;[ I"logger.level = :info ;TI"logger.level = 'INFO' ;TI" ;TI";# :debug < :info < :warn < :error < :fatal < :unknown ;T;0o;;0;[o; ;[I"Constructor;T@o;;[I"-Logger.new(logdev, level: Logger::INFO) ;TI"&Logger.new(logdev, level: :info) ;TI"'Logger.new(logdev, level: 'INFO') ;T;0S; ; i; I" Format;T@o; ;[I"KLog messages are rendered in the output stream in a certain format by ;TI"?default. The default format and a sample are shown below:;T@o; ;[I"Log format:;To;;[I"DSeverityID, [DateTime #pid] SeverityLabel -- ProgName: message ;T;0o; ;[I"Log sample:;To;;[I"AI, [1999-03-03T02:34:24.895701 #19074] INFO -- Main: info. ;T;0o; ;[I"CYou may change the date and time format via #datetime_format=.;T@o;;[I"2logger.datetime_format = '%Y-%m-%d %H:%M:%S' ;TI"( # e.g. "2004-01-03 00:54:26" ;T;0o; ;[I"or via the constructor.;T@o;;[I">Logger.new(logdev, datetime_format: '%Y-%m-%d %H:%M:%S') ;T;0o; ;[I"FOr, you may change the overall format via the #formatter= method.;T@o;;[ I"Dlogger.formatter = proc do |severity, datetime, progname, msg| ;TI" "#{datetime}: #{msg}\n" ;TI" end ;TI"5# e.g. "2005-09-22 08:51:08 +0900: hello world" ;T;0o; ;[I"or via the constructor.;T@o;;[I"MLogger.new(logdev, formatter: proc {|severity, datetime, progname, msg| ;TI" "#{datetime}: #{msg}\n" ;TI"});T;0: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below0o;;[o; ;[I"+not used after 1.2.7. just for compat.;T;I"lib/logger/errors.rb;T;0o;;[;I"lib/logger/formatter.rb;T;0o;;[;I"lib/logger/log_device.rb;T;0o;;[;I"lib/logger/period.rb;T;0o;;[;I"lib/logger/severity.rb;T;0o;;[;I"lib/logger/version.rb;T;0;0;0[ [ I"formatter;TI"RW;T: privateFI"lib/logger.rb;T[ I" level;TI"R;T;F@w[ I" progname;T@v;F@w[ I"sev_threshold;T@z;F@w[U:RDoc::Constant[iI" ProgName;TI"Logger::ProgName;T: public0o;;[;@];0@]@cRDoc::NormalClass0U;[iI"SEV_LABEL;TI"Logger::SEV_LABEL;T;0o;;[o; ;[I".Severity label for logging (max 5 chars).;T;@];0@]@@0U;[iI" VERSION;TI"Logger::VERSION;T;0o;;[;@r;0@r@@0[[I" Severity;To;;[;@];0@w[[I" class;T[[;[[:protected[[;[[I"new;T@w[I" instance;T[[;[[;[[;[ [I"<<;T@w[I"add;T@w[I" close;T@w[I"datetime_format;T@w[I"datetime_format=;T@w[I" debug;T@w[I" debug!;T@w[I" debug?;T@w[I" error;T@w[I" error!;T@w[I" error?;T@w[I" fatal;T@w[I" fatal!;T@w[I" fatal?;T@w[I"format_message;T@w[I"format_severity;T@w[I" info;T@w[I" info!;T@w[I" info?;T@w[I" level=;T@w[I"log;T@w[I" reopen;T@w[I"sev_threshold=;T@w[I" unknown;T@w[I" warn;T@w[I" warn!;T@w[I" warn?;T@w[[U:RDoc::Context::Section[i0o;;[;0;0[ I"lib/logger.rb;TI"lib/logger/errors.rb;TI"lib/logger/formatter.rb;TI"lib/logger/log_device.rb;TI"lib/logger/period.rb;TI"lib/logger/severity.rb;TI"lib/logger/version.rb;T@rcRDoc::TopLevelPK*] Ayy warn-i.rinu[U:RDoc::AnyMethod[iI" warn:ETI"Logger#warn;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Log a +WARN+ message.;To:RDoc::Markup::BlankLineo; ; [I"$See #info for more information.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"(progname = nil, &block);T@FI" Logger;TcRDoc::NormalClass00PK*]t" reopen-i.rinu[U:RDoc::AnyMethod[iI" reopen:ETI"Logger#reopen;TF: privateo:RDoc::Markup::Document: @parts[ S:RDoc::Markup::Heading: leveli: textI" Args;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +logdev+;T; [o:RDoc::Markup::Paragraph; [I"JThe log device. This is a filename (String) or IO object (typically ;TI"H+STDOUT+, +STDERR+, or an open file). reopen the same filename if ;TI"7it is +nil+, do nothing for IO. Default is +nil+.;T@ S; ; i; I"Description;T@ o;; [I"Reopen a log device.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below0I")Logger#reopen Logger#reopen(logdev) ;T0[I"(logdev = nil);T@FI" Logger;TcRDoc::NormalClass00PK*]Period/next_rotate_time-i.rinu[U:RDoc::AnyMethod[iI"next_rotate_time:ETI"$Logger::Period#next_rotate_time;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/logger/period.rb;T:0@omit_headings_from_table_of_contents_below000[I"(now, shift_age);T@ FI" Period;TcRDoc::NormalModule00PK*]8Period/previous_period_end-i.rinu[U:RDoc::AnyMethod[iI"previous_period_end:ETI"'Logger::Period#previous_period_end;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/logger/period.rb;T:0@omit_headings_from_table_of_contents_below000[I"(now, shift_age);T@ FI" Period;TcRDoc::NormalModule00PK*]ޞIIPeriod/cdesc-Period.rinu[U:RDoc::NormalModule[iI" Period:ETI"Logger::Period;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"lib/logger/period.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[U:RDoc::Constant[iI"SiD;TI"Logger::Period::SiD;T: public0o;;[; @ ; 0@ @cRDoc::NormalModule0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[I"next_rotate_time;TI"lib/logger/period.rb;T[I"previous_period_end;T@-[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/logger/period.rb;TI" Logger;TcRDoc::NormalClassPK*]_e,new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Logger::new;TT: privateo:RDoc::Markup::Document: @parts[ S:RDoc::Markup::Heading: leveli: textI" Args;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +logdev+;T; [o:RDoc::Markup::Paragraph; [I"HThe log device. This is a filename (String), IO object (typically ;TI"H+STDOUT+, +STDERR+, or an open file), +nil+ (it writes nothing) or ;TI""+File::NULL+ (same as +nil+).;To;;[I"+shift_age+;T; [o;; [I"KNumber of old log files to keep, *or* frequency of rotation (+daily+, ;TI"I+weekly+ or +monthly+). Default value is 0, which disables log file ;TI"rotation.;To;;[I"+shift_size+;T; [o;; [I"PMaximum logfile size in bytes (only applies when +shift_age+ is a positive ;TI"+Integer). Defaults to +1048576+ (1MB).;To;;[I" +level+;T; [o;; [I"ALogging severity threshold. Default values is Logger::DEBUG.;To;;[I"+progname+;T; [o;; [I"CProgram name to include in log messages. Default value is nil.;To;;[I"+formatter+;T; [o;; [I"KLogging formatter. Default values is an instance of Logger::Formatter.;To;;[I"+datetime_format+;T; [o;; [I"@Date and time format. Default value is '%Y-%m-%d %H:%M:%S'.;To;;[I"+binmode+;T; [o;; [I"?Use binary mode on the log device. Default value is false.;To;;[I"+shift_period_suffix+;T; [o;; [I"MThe log file suffix format for +daily+, +weekly+ or +monthly+ rotation. ;TI"Default is '%Y%m%d'.;T@ S; ; i; I"Description;T@ o;; [I"Create an instance.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below0I" Logger.new(logdev, shift_age = 0, shift_size = 1048576) Logger.new(logdev, shift_age = 'weekly') Logger.new(logdev, level: :info) Logger.new(logdev, progname: 'progname') Logger.new(logdev, formatter: formatter) Logger.new(logdev, datetime_format: '%Y-%m-%d %H:%M:%S') ;T0[I"(logdev, shift_age = 0, shift_size = 1048576, level: DEBUG, progname: nil, formatter: nil, datetime_format: nil, binmode: false, shift_period_suffix: '%Y%m%d');T@ZFI" Logger;TcRDoc::NormalClass00PK*]qn!! warn%21-i.rinu[U:RDoc::AnyMethod[iI" warn!:ETI"Logger#warn!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Sets the severity to WARN.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Logger;TcRDoc::NormalClass00PK*]3Formatter/format_datetime-i.rinu[U:RDoc::AnyMethod[iI"format_datetime:ETI"&Logger::Formatter#format_datetime;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/logger/formatter.rb;T:0@omit_headings_from_table_of_contents_below000[I" (time);T@ FI"Formatter;TcRDoc::NormalClass00PK*]jBFormatter/new-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"Logger::Formatter::new;TT: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/logger/formatter.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"Formatter;TcRDoc::NormalClass00PK*]wFormatter/call-i.rinu[U:RDoc::AnyMethod[iI" call:ETI"Logger::Formatter#call;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/logger/formatter.rb;T:0@omit_headings_from_table_of_contents_below000[I"$(severity, time, progname, msg);T@ FI"Formatter;TcRDoc::NormalClass00PK*]Zo66Formatter/cdesc-Formatter.rinu[U:RDoc::NormalClass[iI"Formatter:ETI"Logger::Formatter;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"(Default formatter for log messages.;T: @fileI"lib/logger/formatter.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ I"datetime_format;TI"RW;T: privateFI"lib/logger/formatter.rb;T[U:RDoc::Constant[iI" Format;TI"Logger::Formatter::Format;T: public0o;;[; @; 0@@cRDoc::NormalClass0U; [iI"DatetimeFormat;TI"&Logger::Formatter::DatetimeFormat;T;0o;;[; @; 0@@@0[[[I" class;T[[;[[:protected[[; [[I"new;T@[I" instance;T[[;[[;[[; [[I" call;T@[I"format_datetime;T@[I" msg2str;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/logger/formatter.rb;TI" Logger;T@PK*]?Formatter/msg2str-i.rinu[U:RDoc::AnyMethod[iI" msg2str:ETI"Logger::Formatter#msg2str;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/logger/formatter.rb;T:0@omit_headings_from_table_of_contents_below000[I" (msg);T@ FI"Formatter;TcRDoc::NormalClass00PK*] ,  Formatter/datetime_format-i.rinu[U:RDoc::Attr[iI"datetime_format:ETI"&Logger::Formatter#datetime_format;TI"RW;T: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/logger/formatter.rb;T:0@omit_headings_from_table_of_contents_below0F@ I"Logger::Formatter;TcRDoc::NormalClass0PK*]$$ fatal%21-i.rinu[U:RDoc::AnyMethod[iI" fatal!:ETI"Logger#fatal!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Sets the severity to FATAL.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Logger;TcRDoc::NormalClass00PK*]brr warn%3f-i.rinu[U:RDoc::AnyMethod[iI" warn?:ETI"Logger#warn?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"YReturns +true+ if and only if the current severity level allows for the printing of ;TI"+WARN+ messages.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Logger;TcRDoc::NormalClass00PK*]$$ debug%21-i.rinu[U:RDoc::AnyMethod[iI" debug!:ETI"Logger#debug!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Sets the severity to DEBUG.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Logger;TcRDoc::NormalClass00PK*],   close-i.rinu[U:RDoc::AnyMethod[iI" close:ETI"Logger#close;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Close the logging device.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Logger;TcRDoc::NormalClass00PK*]YUuu error%3f-i.rinu[U:RDoc::AnyMethod[iI" error?:ETI"Logger#error?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"YReturns +true+ if and only if the current severity level allows for the printing of ;TI"+ERROR+ messages.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Logger;TcRDoc::NormalClass00PK*]-ݡdatetime_format%3d-i.rinu[U:RDoc::AnyMethod[iI"datetime_format=:ETI"Logger#datetime_format=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Set date-time format.;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"+datetime_format+;T; [o; ; [I"1A string suitable for passing to +strftime+.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"(datetime_format);T@FI" Logger;TcRDoc::NormalClass00PK*] }} error-i.rinu[U:RDoc::AnyMethod[iI" error:ETI"Logger#error;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Log an +ERROR+ message.;To:RDoc::Markup::BlankLineo; ; [I"$See #info for more information.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"(progname = nil, &block);T@FI" Logger;TcRDoc::NormalClass00PK*]i unknown-i.rinu[U:RDoc::AnyMethod[iI" unknown:ETI"Logger#unknown;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QLog an +UNKNOWN+ message. This will be printed no matter what the logger's ;TI"level is.;To:RDoc::Markup::BlankLineo; ; [I"$See #info for more information.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"(progname = nil, &block);T@FI" Logger;TcRDoc::NormalClass00PK*]vuu debug%3f-i.rinu[U:RDoc::AnyMethod[iI" debug?:ETI"Logger#debug?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"YReturns +true+ if and only if the current severity level allows for the printing of ;TI"+DEBUG+ messages.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Logger;TcRDoc::NormalClass00PK*]a#add-i.rinu[U:RDoc::AnyMethod[iI"add:ETI"Logger#add;TF: privateo:RDoc::Markup::Document: @parts[S:RDoc::Markup::Heading: leveli: textI" Args;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I"+severity+;T; [o:RDoc::Markup::Paragraph; [I"LSeverity. Constants are defined in Logger namespace: +DEBUG+, +INFO+, ;TI",+WARN+, +ERROR+, +FATAL+, or +UNKNOWN+.;To;;[I"+message+;T; [o;; [I"-The log message. A String or Exception.;To;;[I"+progname+;T; [o;; [I"GProgram name string. Can be omitted. Treated as a message if no ;TI"%+message+ and +block+ are given.;To;;[I" +block+;T; [o;; [I"ICan be omitted. Called to get a message string if +message+ is nil.;T@ S; ; i; I" Return;T@ o;; [I"NWhen the given severity is not high enough (for this particular logger), ;TI"'log no message, and return +true+.;T@ S; ; i; I"Description;T@ o;; [I"NLog a message if the given severity is high enough. This is the generic ;TI"Ologging method. Users will be more inclined to use #debug, #info, #warn, ;TI"#error, and #fatal.;T@ o;; [ I"JMessage format: +message+ can be any object, but it has to be ;TI"Mconverted to a String in order to log it. Generally, +inspect+ is used ;TI"*if the given object is not a String. ;TI"OA special case is an +Exception+ object, which will be printed in detail, ;TI"Dincluding message, class, and backtrace. See #msg2str for the ;TI" implementation if required.;T@ S; ; i; I" Bugs;T@ o;;: BULLET;[o;;0; [o;; [I"Logfile is not locked.;To;;0; [o;; [I",Append open does not need to lock file.;To;;0; [o;; [I"AIf the OS supports multi I/O, records possibly may be mixed.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below0I"ALogger#add(severity, message = nil, progname = nil) { ... } ;TI";T[[I"log;To;; [;@V;0I".(severity, message = nil, progname = nil);T@VFI" Logger;TcRDoc::NormalClass00PK*]OHO  sev_threshold%3d-i.rinu[U:RDoc::AnyMethod[iI"sev_threshold=:ETI"Logger#sev_threshold=;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"(severity);T@ FI" Logger;TcRDoc::NormalClass0[@FI" level=;TPK*]B info-i.rinu[U:RDoc::AnyMethod[iI" info:ETI"Logger#info;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Log an +INFO+ message.;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"+message+;T; [o; ; [I"6The message to log; does not need to be a String.;To;;[I"+progname+;T; [o; ; [I"Logger::INFO).;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below0F@I" Logger;TcRDoc::NormalClass0PK*]2-!! info%21-i.rinu[U:RDoc::AnyMethod[iI" info!:ETI"Logger#info!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Sets the severity to INFO.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Logger;TcRDoc::NormalClass00PK*]e`rr info%3f-i.rinu[U:RDoc::AnyMethod[iI" info?:ETI"Logger#info?;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"YReturns +true+ if and only if the current severity level allows for the printing of ;TI"+INFO+ messages.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Logger;TcRDoc::NormalClass00PK*]:UUUdatetime_format-i.rinu[U:RDoc::AnyMethod[iI"datetime_format:ETI"Logger#datetime_format;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"?Returns the date format being used. See #datetime_format=;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Logger;TcRDoc::NormalClass00PK*]Fformat_severity-i.rinu[U:RDoc::AnyMethod[iI"format_severity:ETI"Logger#format_severity;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"(severity);T@ FI" Logger;TcRDoc::NormalClass00PK*]v?nlog-i.rinu[U:RDoc::AnyMethod[iI"log:ETI"Logger#log;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I".(severity, message = nil, progname = nil);T@ FI" Logger;TcRDoc::NormalClass0[@FI"add;TPK*]~$$ error%21-i.rinu[U:RDoc::AnyMethod[iI" error!:ETI"Logger#error!;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Sets the severity to ERROR.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI" Logger;TcRDoc::NormalClass00PK*]}oo %3c%3c-i.rinu[U:RDoc::AnyMethod[iI"<<:ETI"Logger#<<;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"MDump given message to the log device without any formatting. If no log ;TI"!device exists, return +nil+.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I" (msg);T@FI" Logger;TcRDoc::NormalClass00PK*]o level%3d-i.rinu[U:RDoc::AnyMethod[iI" level=:ETI"Logger#level=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"$Set logging severity threshold.;To:RDoc::Markup::BlankLineo:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I"+severity+;T; [o; ; [I"%The Severity of the log message.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[[I"sev_threshold=;To;; [;@;0I"(severity);T@FI" Logger;TcRDoc::NormalClass00PK*]eQSeverity/cdesc-Severity.rinu[U:RDoc::NormalModule[iI" Severity:ETI"Logger::Severity;T0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"Logging severity.;T: @fileI"lib/logger/severity.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[ U:RDoc::Constant[iI" DEBUG;TI"Logger::Severity::DEBUG;T: public0o;;[o; ;[I"2Low-level information, mostly for developers.;T; @; 0@@cRDoc::NormalModule0U; [iI" INFO;TI"Logger::Severity::INFO;T; 0o;;[o; ;[I"9Generic (useful) information about system operation.;T; @; 0@@@0U; [iI" WARN;TI"Logger::Severity::WARN;T; 0o;;[o; ;[I"A warning.;T; @; 0@@@0U; [iI" ERROR;TI"Logger::Severity::ERROR;T; 0o;;[o; ;[I""A handleable error condition.;T; @; 0@@@0U; [iI" FATAL;TI"Logger::Severity::FATAL;T; 0o;;[o; ;[I";An unhandleable error that results in a program crash.;T; @; 0@@@0U; [iI" UNKNOWN;TI"Logger::Severity::UNKNOWN;T; 0o;;[o; ;[I"5An unknown message that should always be logged.;T; @; 0@@@0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[I"lib/logger/severity.rb;TI" Logger;TcRDoc::NormalClassPK*]r|| fatal-i.rinu[U:RDoc::AnyMethod[iI" fatal:ETI"Logger#fatal;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Log a +FATAL+ message.;To:RDoc::Markup::BlankLineo; ; [I"$See #info for more information.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"(progname = nil, &block);T@FI" Logger;TcRDoc::NormalClass00PK*]CSformat_message-i.rinu[U:RDoc::AnyMethod[iI"format_message:ETI"Logger#format_message;TF: privateo:RDoc::Markup::Document: @parts[: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"((severity, datetime, progname, msg);T@ FI" Logger;TcRDoc::NormalClass00PK*]S|| debug-i.rinu[U:RDoc::AnyMethod[iI" debug:ETI"Logger#debug;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Log a +DEBUG+ message.;To:RDoc::Markup::BlankLineo; ; [I"$See #info for more information.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below000[I"(progname = nil, &block);T@FI" Logger;TcRDoc::NormalClass00PK*]8Hu** progname-i.rinu[U:RDoc::Attr[iI" progname:ETI"Logger#progname;TI"RW;T: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"-Program name to include in log messages.;T: @fileI"lib/logger.rb;T:0@omit_headings_from_table_of_contents_below0F@I" Logger;TcRDoc::NormalClass0PK*] &formatter-i.rinu[PK*]t%CCXsev_threshold-i.rinu[PK*]  LogDevice/shift_log_age-i.rinu[PK*]<&3LogDevice/check_shift_log-i.rinu[PK*]Ї@LogDevice/cdesc-LogDevice.rinu[PK*]/b LogDevice/add_log_header-i.rinu[PK*]Z/ LogDevice/reopen-i.rinu[PK*]UKK LogDevice/new-c.rinu[PK*] 5KLogDevice/shift_log_period-i.rinu[PK*]R6LogDevice/close-i.rinu[PK*] y=LogDevice/filename-i.rinu[PK*]⳺LogDevice/create_logfile-i.rinu[PK*]XLogDevice/write-i.rinu[PK*]A&LogDevice/set_dev-i.rinu[PK*]VGmLogDevice/open_logfile-i.rinu[PK*][bLogDevice/dev-i.rinu[PK*]LogDevice/lock_shift_log-i.rinu[PK*]aw\uu [fatal%3f-i.rinu[PK*]%% cdesc-Logger.rinu[PK*] Ayy BDwarn-i.rinu[PK*]t" Ereopen-i.rinu[PK*]+IPeriod/next_rotate_time-i.rinu[PK*]8JPeriod/previous_period_end-i.rinu[PK*]ޞIIKPeriod/cdesc-Period.rinu[PK*]_e,Nnew-c.rinu[PK*]qn!!