From: merch-redmine@jeremyevans.net
To: ruby-core@ruby-lang.org
Subject: [ruby-core:100074] [Ruby master Bug#12468] Logger: Can not rotate (log shifting failed. closed stream)
Date: Tue, 22 Sep 2020 18:30:02 +0000 (UTC) [thread overview]
Message-ID: <redmine.journal-87626.20200922183001.9318@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-12468.20160607121327.9318@ruby-lang.org
Issue #12468 has been updated by jeremyevans0 (Jeremy Evans).
I can't test cygwin, but I've added a pull request to logger that should fix this by treating cygwin like mswin and mingw in regards to log shifting: https://github.com/ruby/logger/pull/50
----------------------------------------
Bug #12468: Logger: Can not rotate (log shifting failed. closed stream)
https://bugs.ruby-lang.org/issues/12468#change-87626
* Author: rovf (Ronald Fischer)
* Status: Open
* Priority: Normal
* ruby -v: ruby 2.2.4p230 (2015-12-16 revision 53155) [x86_64-cygwin]
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
If I configure a Logger to rotate, by the time the logger is supposed to do the first rotation, it creates the new log file, but then hangs. When I abort the program using Control-C, I get an infinite series of error messages saying
log shifting failed. closed stream
You can reproduce the error, if you run the attached example program on **Windows** (it could be a platform issue). The only prerequisite is that a subdirectory 'logs' must exist below the working directory.
I'm reporting error for the Cygwin version of Ruby. However, I found the nearly identical error also with JRuby 1.9.3, which suggests that the bug is likely in the Ruby stdlib code, and not in the specific port (i.e. Cygwin vs. JRuby). The main difference between the behaviour of the bug in Cygwin Ruby vs. JRuby is that aborting the program on JRuby does not produced the "log shifting...." error message.
---Files--------------------------------
logtest_s.rb (481 Bytes)
--
https://bugs.ruby-lang.org/
parent reply other threads:[~2020-09-22 18:30 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <redmine.issue-12468.20160607121327.9318@ruby-lang.org>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.ruby-lang.org/en/community/mailing-lists/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=redmine.journal-87626.20200922183001.9318@ruby-lang.org \
--to=ruby-core@ruby-lang.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).