aboutsummaryrefslogtreecommitdiffstats
path: root/lib/logger.rb
Commit message (Collapse)AuthorAgeFilesLines
* * lib/logger.rb: Add shift_period_suffix option [Fix GH-10772]sonots2016-04-181-7/+13
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Allow specifying logger parameters in constructorsonots2016-04-181-4/+34
| | | | | | | * lib/logger.rb: Allow specifying logger prameters such as level, progname, datetime_format, formatter in constructor [Bug #12224] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Logger: simple refactoringnobu2016-04-061-5/+6
| | | | | | | | | * lib/logger.rb (Logger#level=): remove unnecessary local variable. * lib/logger.rb (Logger#initialize, Logger#reopen): [DOC] mention the default values. cherrypicked from [GH-1319]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* logger.rb: kwd argsnobu2016-03-081-3/+3
| | | | | | | * lib/logger.rb (Logger::LogDevice#initialize): define using keyword arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/logger.rb: Remove block from Logger.add as it's not neededsonots2016-02-091-1/+1
| | | | | | patch provided by Daniel Lobato Garcí [fix GH-1240] [Bug #12054] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add frozen_string_literal: false for all filesnaruse2015-12-161-0/+1
| | | | | | When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/logger.rb: expose logger mutexsonots2015-11-201-8/+5
| | | | | | [fix GH-541] Patch by @arthurnn git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/logger.rb: support symbol and string log level settingsonots2015-11-171-1/+35
| | | | | | [fix GH-1101] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/logger.rb: Add Logger#reopensonots2015-11-171-6/+47
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* logger.rb: end of week should be Saturdaynobu2015-10-271-1/+1
| | | | | | | | | * lib/logger.rb (Logger::Period#previous_period_end): as weekly rotation shifts the log file on Sundays, the end date of the previous period should be Saturdays. fix r45072. [ruby-dev:49314] [Bug #11622] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* logger.rb: fix weekly rotationnobu2015-10-271-3/+5
| | | | | | | | * lib/logger.rb (Logger::Period#next_rotate_time): get rid of adding to mday not to exceed the days of the month. [ruby-core:71185] [Bug #11620] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* logger.rb: exact matchingnobu2015-10-261-6/+6
| | | | | | | * lib/logger.rb ({next,previous}_rotate_time): dispatch by exact matching shift_age instead of regexp matching. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* logger.rb: freeze constantsnobu2015-10-261-3/+3
| | | | | | * lib/logger.rb: freeze constant strings and array. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* logger.rb: simplifynobu2014-08-251-5/+1
| | | | | | | * lib/logger.rb (format_datetime): simplify and freeze the default format so that it can be shared. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/logger.rb: use %Nnobu2014-08-251-1/+1
| | | | | | | * lib/logger.rb (format_datetime): use "%6N" to show microsecond. [Fix GH-704] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * logger.rb: removed unmaintain code.hsbt2014-07-021-123/+0
| | | | | | | [Feature #9860][ruby-core:62724] * test/logger/test_application.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/gserver.rb: remove redundant use of to_s in interpolation.hsbt2014-06-241-1/+1
| | | | | | | | | | * lib/logger.rb: ditto. * lib/optparse.rb: ditto. * lib/rbconfig/obsolete.rb: ditto. * lib/resolv.rb: ditto. * lib/webrick/httpresponse.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/logger.rb: refactored to include Logger::Period.hsbt2014-05-241-43/+39
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* logger.rb: DSTnobu2014-02-211-10/+7
| | | | | | | * lib/logger.rb (next_rotate_time, previous_period_end): consider DST change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* logger.rb: fix midnight log rotation missnobu2014-02-211-7/+34
| | | | | | | | | | * lib/logger.rb (Logger::LogDevice#check_shift_log): compare the current time with the time for the next rotation to fix rotation miss when date changed between the comparison and log writing. based on the patch by megayu <yuhg2310 AT gmail.com>. [Fixes GH-539] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/logger.rb: [DOC] Fix arg name for Logger.new by @ryotarai [ci skip] ↵hsbt2014-02-111-2/+2
| | | | | | [fix GH-531] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* logger.rb: fix extra log ratationnobu2013-12-141-2/+1
| | | | | | | | * lib/logger.rb (lock_shift_log): no need to rotate the log file if it has been rotated by another process. based on the patch by no6v (Nobuhiro IMAI) in [ruby-core:58620]. [Bug #9133] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* logger.rb: fix r43511 for Windowsnobu2013-11-021-2/+6
| | | | | | | | | | * lib/logger.rb (Logger::LogDevice::LogDeviceMutex#lock_shift_log): open file can't be removed or renamed on Windows. [ruby-dev:47790] [Bug #9046] * test/logger/test_logger.rb (TestLogDevice#run_children): don't use fork. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/logger.rb: Inter-process locking for log rotationnaruse2013-11-011-8/+49
| | | | | | | | Current implementation fails log rotation on multi process env. by sonots <sonots@gmail.com> https://github.com/ruby/ruby/pull/428 fix GH-428 [Bug #9046] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/logger.rb: Use :call-seq: for method signature rdoczzak2013-07-101-6/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/logger.rb (#add): Remove incorrect rdoc for return valuezzak2013-07-101-2/+0
| | | | | | | [Bug #8567] Reported by Tim Pease. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/logger.rb (Logger::Application): show namespace in documentationeregon2013-05-201-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/logger.rb: Updated example in Logger comment to match otherdrbrain2012-07-201-9/+11
| | | | | | | | examples and fixed a bug. Patch by Marcus Stollsteimer. [Bug #6759] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/logger.rb: Updated typos and output to match modern Loggerdrbrain2012-07-181-51/+53
| | | | | | | output. Patch by Marcus Stollsteimer. [Bug #6738] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib: revert r31635-r31638 and untabify with expand(1).nobu2011-05-191-10/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib: Convert tabs to spaces for ruby files perdrbrain2011-05-181-10/+10
| | | | | | | | | http://redmine.ruby-lang.org/projects/ruby/wiki/DeveloperHowto#coding-style Patch by Steve Klabnik [Ruby 1.9 - Bug #4730] Patch by Jason Dew [Ruby 1.9 - Feature #4718] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib: remove trailing spaces.nobu2011-05-181-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/logger.rb: Improve documentation. Patch by David Copeland.drbrain2011-05-161-48/+83
| | | | | | | [Ruby 1.9 - Bug #4706] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/logger.rb: format comments to keep 80 columns in a line.nagachika2011-05-131-3/+4
| | | | | | | | * lib/uri/common.rb: ditto. * lib/uri/ftp.rb: ditto. * lib/uri/ldap.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/logger.rb (class Logger): Document Logger#datetime_format.drbrain2011-05-121-0/+1
| | | | | | | Patch by Sergio Gil Pérez de la Manga. [Ruby 1.9 - Bug #4678] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: fix a typo.nagachika2011-05-111-1/+1
| | | | | | | | * lib/logger.rb: ditto * lib/rss.rb: ditto * lib/webrick/httpauth/authenticator.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/logger.rb: added RDoc document for logging message escapenahi2011-01-181-2/+16
| | | | | | | by Hal Brodigan. See #3869 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: Fix unused variable warnings.marcandre2010-07-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | Patch by Run Paint [ruby-core:30991] * lib/date.rb: ditto * lib/debug.rb: ditto * lib/drb/drb.rb: ditto * lib/drb/invokemethod.rb: ditto * lib/irb/ruby-lex.rb: ditto * lib/irb/slex.rb: ditto * lib/logger.rb: ditto * lib/pathname.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/logger.rb: imported upstream version (logger/1.2.7) see #2238.nahi2009-10-201-42/+60
| | | | | | | | | | * do not raise an exception even if log writing failed. * do not raise ShiftingError if an aged file already exists. (no ShiftingError will be raised from 1.2.7, just warn() instead) * test/logger/test_logger.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/logger.rb (Logger): should handle the case that cvs/svn domatz2008-11-191-1/+7
| | | | | | not expand $Id keyword. [ruby-core:19991] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/logger.rb (ProgName): fixed typo.nobu2008-11-181-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/logger.rb (ProgName): fixed for svn, based on a patch fromnobu2008-11-181-2/+2
| | | | | | | Nobuhiro IMAI at [ruby-dev:37108]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rdoc.rb: massive spelling correction patch from Evan Farrarmatz2008-06-041-1/+1
| | | | | | <evanfarrar at gmail.com> in [ruby-doc:1382] applied. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/logger.rb (Logger::Application): remove meaningless logdevnahi2007-05-161-7/+30
| | | | | | | | attribute and added logger attribute instead. [ruby-core:11143] also added Logger#formatter rdoc comment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Documentation cleanup.drbrain2006-08-041-10/+1
| | | | | | | | | | Includes patches by Hugh Sasse: * ping.rb * weakref.rb * mailread.rb git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/logger.rb: improves the amount of documentation that Rdocmatz2006-07-311-3/+3
| | | | | | | | | picks up when processing logger.rb by moving the require statement back before the comment block. a patch from Hugh Sasse <hgs at dmu.ac.uk>. [ruby-core:08422] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/logger.rb (Logger): added formatter accessor to logger fornahi2005-09-131-78/+64
| | | | | | | | | | | | | | | | dictating the way in which the logger should format the messages it displays. Thanks to Nicholas Seckar (cf. [ruby-talk:153391]) and Daniel Berger. * lib/logger.rb (Logger): added VERSION constant. * lib/logger.rb: removed document for LogDevice. It is an implementation detail and is not a public interface. * test/logger/test_logger.rb: added tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/logger.rb (write, shift_log?, shift_log): file shifting racenahi2005-08-201-65/+64
| | | | | | | | | condition bug fixed. [ruby-dev:26764] * test/logger/test_logger.rb: tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* document fix [ruby-dev:26516] (patch from Kazuhiro NISHIYAMA)ocean2005-07-161-4/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (string_content): turn off NODE_NEWLINE flag to avoidmatz2004-05-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | unnecessary line trace for inlined expression. (ruby-bugs PR#1320) * numeric.c (flo_to_s): tweak output string based to preserve decimal point and to remove trailing zeros. [ruby-talk:97891] * string.c (rb_str_index_m): use unsigned comparison for T_FIXNUM search. [ruby-talk:97342] * hash.c (rb_hash_equal): returns true if two hashes have same set of key-value set. [ruby-talk:97559] * hash.c (rb_hash_eql): returns true if two hashes are equal and have same default values. * string.c (rb_str_equal): always returns true or false, never returns nil. [ruby-dev:23404] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e