aboutsummaryrefslogtreecommitdiffstats
path: root/test/logger
Commit message (Collapse)AuthorAgeFilesLines
* Fixed misspellingsNobuyoshi Nakada2019-12-201-1/+1
| | | | Fixed misspellings reported at [Bug #16437], for default gems.
* [ruby/logger] Fixed leaked tempfileNobuyoshi Nakada2019-12-171-1/+1
| | | | https://github.com/ruby/logger/commit/fb3eff153f
* Followed up 38722fa179fcec549300b2f35206f4eb168f202eHiroshi SHIBATA2019-12-101-8/+4
|
* [ruby/logger] Enable more timezone tests on OpenBSDJeremy Evans2019-12-101-1/+1
| | | | https://github.com/ruby/logger/commit/bcd7e227e8
* [ruby/logger] Raise ArgumentError for invalid shift_ageJeremy Evans2019-12-101-2/+5
| | | | | | | | | Consider 'now' and 'everytime' as valid values for the previous behavior of rotating everytime. Fixes Ruby Bug 15977 https://github.com/ruby/logger/commit/f92979a376
* [ruby/logger] Honor Logger#level overridesGeorge Claghorn2019-12-101-0/+15
| | | | https://github.com/ruby/logger/commit/7365c995bf
* Added workaround for CoreAssertions used by ruby/logger.Hiroshi SHIBATA2019-12-091-2/+7
|
* Merge the upstream changes for test-unit on ruby/logger.Hiroshi SHIBATA2019-12-091-0/+3
| | | | | | | This commits are based with: https://github.com/ruby/logger/commit/f067f7d1aa743b467d633ec6d1790bd93ed9e25b https://github.com/ruby/logger/commit/86058f420d8f6909500cccceb24f58bef0597b4d https://github.com/ruby/logger/commit/02db6e8ed85d1f4ba974f08fee292bad400d9fc2
* Fix keyword argument warnings in the tests from Class#newJeremy Evans2019-09-061-1/+1
| | | | This were previously hidden because calls from C were not warned.
* Move helper file of logger to under the test/logger.Hiroshi SHIBATA2019-07-155-5/+9
|
* [ruby/logger] Add option to set the binary mode of the log deviceRafael Mendonça França2019-07-152-0/+26
| | | | | | | | | | | | Without binmode strings with incompatible encoding can't be written in the file. This is very common in applications that log user provided parameters. We need to allow changing the binnary mode because right now it is impossible to use the built-in log rotation feature when you provide a File object to the LogDevice, and if you provide a filename you can't have binmode. https://github.com/ruby/logger/commit/9114b3ac7e
* [ruby/logger] Set filename when initializing logger with a File objectJeremy Evans2019-07-151-0/+15
| | | | | | This should allow reopen to work. Requested in ruby issue #14595. https://github.com/ruby/logger/commit/bd367aff12
* [ruby/logger] Fix to use logger and test-unit in this repo withsonots2019-07-153-9/+6
| | | | | | `ruby test/logger/test_xxx.rb` https://github.com/ruby/logger/commit/d3c2402340
* [ruby/logger] Add support for changing severity using bang methods.Samuel Williams2019-07-151-0/+11
| | | | https://github.com/ruby/logger/commit/ae4c6dfcbb
* Fix timezone issue for logger period's testsYusuke Endoh2019-07-021-0/+85
| | | | | | This is a retry of 181b966e7553ac53d034266a7cdc18664d080814. "Revert "Add a missing tests for Logger::Period module"" is also reverted.
* Revert "Add a missing tests for Logger::Period module"Koichi Sasada2019-07-021-85/+0
| | | | This reverts commit 181b966e7553ac53d034266a7cdc18664d080814.
* Add a missing tests for Logger::Period moduleAnton Davydov2019-07-021-0/+85
| | | | Closes: https://github.com/ruby/ruby/pull/2266
* Remove unused variablesk0kubun2018-03-171-2/+2
| | | | | | | | | | | | | | This fixes following warning: ``` test/logger/test_logger.rb:329: warning: assigned but unused variable - read_read ``` [Fix GH-1840] From: yuuji.yaginuma <yuuji.yaginuma@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* revert r60999usa2017-12-041-6/+0
| | | | | | | | * test/logger/test_logdevice.rb: revert r60999 because it was caused by not committed changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* give a change to determine to rotate the log or notusa2017-12-031-0/+6
| | | | | | | | * test/logger/test_logdevice.rb (test_shifting_{age,period_suffix}): give a chance to determine to rotate the log or not. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* multiple arguments to writenobu2017-10-231-1/+1
| | | | | | | Make write methods of IO-like objects accept multiple arguments, as well as IO#write. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* logger.rb: Fix handling prognamesonots2017-07-201-0/+4
| | | | | | | | | | | | | | Because progname was memoized with ||= a logger call that involved outputting false would be nil. Example code: logger = Logger.new(STDOUT) logger.info(false) # => nil Perform an explicit nil check instead of ||= so that false will be output. patched by Gavin Miller <gavingmiller@gmail.com> [Fix GH-1667] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* logger.rb: fix next rotate timenobu2016-11-161-10/+155
| | | | | | | | | | * lib/logger.rb (Logger::LogDevice#initialize): calculate next rotate time based on the mtime of the last existing file. [ruby-dev:49881] [Bug #12948] Author: Tsukasa Oishi <tsukasa.oishi@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/logger/test_logdevice.rb: heredoc stylesnobu2016-11-161-12/+21
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_logger.rb: suppress a warningnobu2016-11-051-0/+3
| | | | | | | * test/logger/test_logger.rb (test_datetime_format): suppress warning when strftime called with empty format string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* logger: fix monthly log rotate with DSTnobu2016-10-081-0/+90
| | | | | | | | | | | | | | | | * lib/logger.rb (Logger::Period#next_rotate_time): fix monthly log rotate when DST is applied during a month of 31 days. [Fix GH-1458] With DST the month of october can actually last more than 31 days. It can last 31 days plus 1 hour. So during october, `t` used to be equal to "2016-10-31 23:00:00" instead of "2016-11-01 00:00:00". This was then normalized to "2016-10-01 00:00:00" which lead every single line of log during october to rotate the log file. This fix ensure that next_rotate_time(now, 'monthly') always return the first day of next month in every situation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/logger/test_logdevice.rb (TestLogDevice#test_shifting_period_suffix):usa2016-05-011-1/+0
| | | | | | | | too many shifting. the last shifting created logs named as `*.3`, and they were never unlinked. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use more descriptive assertionsnobu2016-04-191-57/+57
| | | | | | | * test/logger/test_logdevice.rb: use assert_predicate, assert_not_predicate, and assert_file instead of bare assert. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/logger/test_logdevice.rb: fix tests to pass on windowssonots2016-04-181-4/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/logger.rb: Add shift_period_suffix option [Fix GH-10772]sonots2016-04-181-0/+28
| | | | 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-0/+42
| | | | | | | * 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
* Add frozen_string_literal: false for all filesnaruse2015-12-163-0/+3
| | | | | | 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
* * test/logger/test_logdevice.rb: Fix tests of logger to make it work onsonots2015-11-181-5/+11
| | | | | | windows (windows can not remove opened file) [Bug #11702] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/logger.rb: support symbol and string log level settingsonots2015-11-171-0/+44
| | | | | | [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-172-0/+72
| | | | 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-0/+43
| | | | | | | | | * 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-1/+31
| | | | | | | | * 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
* use assert_raisenobu2015-06-021-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/lib/envutil.rb: Moved from test/ruby/.akr2014-11-131-1/+0
| | | | | | | | | | | | | | * test/lib/find_executable.rb: Ditto. * test/lib/memory_status.rb: Ditto. * test/lib/test/unit.rb: require envutil. * test/: Don't require envutil in test files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * logger.rb: removed unmaintain code.hsbt2014-07-021-54/+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
* test/logger/test_logdevice.rb: Close fds.akr2014-05-291-1/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_logdevice.rb: no utimenobu2014-02-221-2/+3
| | | | | | | * test/logger/test_logdevice.rb (test_shifting_midnight): do not set mtime to get rid of an error on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_logdevice.rb: use assert_in_out_errnobu2014-02-221-2/+2
| | | | | | | | | * test/logger/test_logdevice.rb (test_shifting_midnight): use verbose assert_in_out_err instead of assert_ruby_status. * test/logger/test_logdevice.rb (test_shifting_dst_change): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_logdevice.rb: run iff timezene supportednobu2014-02-211-1/+1
| | | | | | | * test/logger/test_logdevice.rb (test_shifting_dst_change): test only on platforms where timezone is supported. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* logger.rb: DSTnobu2014-02-211-0/+38
| | | | | | | * 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-0/+36
| | | | | | | | | | * 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
* test/logger: splitnobu2014-02-214-403/+411
| | | | | | * test/logger: split for each test cases. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/net/ftp/test_ftp.rb: remove unused variables.hsbt2014-02-161-3/+2
| | | | | | test/logger/test_logger.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_logger.rb: fix system dependent testnobu2013-12-151-1/+1
| | | | | | | * test/logger/test_logger.rb (test_shifting_size_not_rotate_too_much): useless test on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* logger.rb: fix extra log ratationnobu2013-12-141-0/+39
| | | | | | | | * 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