<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/lib/logger.rb, branch v2_5_8</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>* lib/logger.rb (Logger::LogDevice#open_logfile, #create_logfile):</title>
<updated>2017-12-21T05:07:43+00:00</updated>
<author>
<name>sonots</name>
<email>sonots@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2017-12-21T05:07:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7176eb2df98ed89e686c5cc116e9e88ecb238a1c'/>
<id>7176eb2df98ed89e686c5cc116e9e88ecb238a1c</id>
<content type='text'>
  Logger should be able to open only files [Bug #14212]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  Logger should be able to open only files [Bug #14212]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>logger.rb: Fix handling progname</title>
<updated>2017-07-20T16:47:26+00:00</updated>
<author>
<name>sonots</name>
<email>sonots@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2017-07-20T16:47:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=93fe0ff2f1a2818523799d3da68cade115bec783'/>
<id>93fe0ff2f1a2818523799d3da68cade115bec783</id>
<content type='text'>
Because progname was memoized with ||= a logger call that involved
outputting false would be nil. Example code:

  logger = Logger.new(STDOUT)
  logger.info(false)  # =&gt; nil

Perform an explicit nil check instead of ||= so that false will be output.

patched by Gavin Miller &lt;gavingmiller@gmail.com&gt; [Fix GH-1667]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Because progname was memoized with ||= a logger call that involved
outputting false would be nil. Example code:

  logger = Logger.new(STDOUT)
  logger.info(false)  # =&gt; nil

Perform an explicit nil check instead of ||= so that false will be output.

patched by Gavin Miller &lt;gavingmiller@gmail.com&gt; [Fix GH-1667]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>logger: remove redundant opt_str_freeze use</title>
<updated>2017-03-24T07:29:33+00:00</updated>
<author>
<name>normal</name>
<email>normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2017-03-24T07:29:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7142f5b595f46626b7a87d9fe609759972081ff3'/>
<id>7142f5b595f46626b7a87d9fe609759972081ff3</id>
<content type='text'>
Strings in "when" statements are allocation-free, so there's
never any reason to uglify the code to use opt_str_freeze over
the normal putobject instructions, here.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Strings in "when" statements are allocation-free, so there's
never any reason to uglify the code to use opt_str_freeze over
the normal putobject instructions, here.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>logger.rb: fix next rotate time</title>
<updated>2016-11-16T06:59:42+00:00</updated>
<author>
<name>nobu</name>
<email>nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2016-11-16T06:59:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f6e77b9d3555c1fbaa8aab1cdc0bd6bde95f62c6'/>
<id>f6e77b9d3555c1fbaa8aab1cdc0bd6bde95f62c6</id>
<content type='text'>
* 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 &lt;tsukasa.oishi@gmail.com&gt;

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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 &lt;tsukasa.oishi@gmail.com&gt;

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>* lib/logger.rb: Improve Logger.new option documentation.</title>
<updated>2016-10-14T09:01:01+00:00</updated>
<author>
<name>hsbt</name>
<email>hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2016-10-14T09:01:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=990b23bbbc991f7f2c9778fd85ba0a3aa773dbdb'/>
<id>990b23bbbc991f7f2c9778fd85ba0a3aa773dbdb</id>
<content type='text'>
  [Feature #12803][ruby-core:77467]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  [Feature #12803][ruby-core:77467]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>logger: fix monthly log rotate with DST</title>
<updated>2016-10-08T00:06:57+00:00</updated>
<author>
<name>nobu</name>
<email>nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2016-10-08T00:06:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8fc170a34eff0190533b669b3e9f6b6aba42e48c'/>
<id>8fc170a34eff0190533b669b3e9f6b6aba42e48c</id>
<content type='text'>
* 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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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
</pre>
</div>
</content>
</entry>
<entry>
<title>[DOC] Fix default value of shift_age [ci skip]</title>
<updated>2016-10-03T12:21:14+00:00</updated>
<author>
<name>kazu</name>
<email>kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2016-10-03T12:21:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=81ac73c04d9ebe2d29d890381fe6fbc6725e490d'/>
<id>81ac73c04d9ebe2d29d890381fe6fbc6725e490d</id>
<content type='text'>
`LogDevice#initialize` treats shift_age: nil as 7, but
Logger#initialize has the default value of shift_age as 0.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`LogDevice#initialize` treats shift_age: nil as 7, but
Logger#initialize has the default value of shift_age as 0.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>* lib/logger.rb: Add shift_period_suffix option [Fix GH-10772]</title>
<updated>2016-04-18T15:07:31+00:00</updated>
<author>
<name>sonots</name>
<email>sonots@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2016-04-18T15:07:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2c6f15b1ad90af37d7e0eefff7b3f5262e0a4c0b'/>
<id>2c6f15b1ad90af37d7e0eefff7b3f5262e0a4c0b</id>
<content type='text'>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow specifying logger parameters in constructor</title>
<updated>2016-04-18T10:45:40+00:00</updated>
<author>
<name>sonots</name>
<email>sonots@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2016-04-18T10:45:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a0409533866991529136224b549f53f2ab61c8e4'/>
<id>a0409533866991529136224b549f53f2ab61c8e4</id>
<content type='text'>
* 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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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
</pre>
</div>
</content>
</entry>
<entry>
<title>Logger: simple refactoring</title>
<updated>2016-04-06T01:56:16+00:00</updated>
<author>
<name>nobu</name>
<email>nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2016-04-06T01:56:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=84d818678f005383ce6bc727be0ecaf1b5636743'/>
<id>84d818678f005383ce6bc727be0ecaf1b5636743</id>
<content type='text'>
* 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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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
</pre>
</div>
</content>
</entry>
</feed>
