[issue16449] RotatingFileHandler rollover doesn't work on QNX shmem filesystems

2012-11-11 Thread Vinay Sajip
Vinay Sajip added the comment: > Doesn't the "rotator" attribute break atomicity? Which rotator do you mean? The default rotator is None, which leads to os.rename being called. If you're referring to the example in the documentation (cookbook) - it was intended purely as an example, and the pa

[issue16449] RotatingFileHandler rollover doesn't work on QNX shmem filesystems

2012-11-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Doesn't the "rotator" attribute break atomicity? A careful rotator should first rename the source to the temporary file, process the data and save it to other temporary file, and then rename the result to the destination and remove the first temporary file.

[issue16449] RotatingFileHandler rollover doesn't work on QNX shmem filesystems

2012-11-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I've updated the type to enhancement (it seems like a grey area to me > - it's a behavioural fix for a niche use case). > > I suggested a patch rather than simply subclassing RotatingFileHandler > since: > - The subclass would just have a copy of RotatingFil

[issue16449] RotatingFileHandler rollover doesn't work on QNX shmem filesystems

2012-11-11 Thread Phil Connell
Phil Connell added the comment: I've updated the type to enhancement (it seems like a grey area to me - it's a behavioural fix for a niche use case). I suggested a patch rather than simply subclassing RotatingFileHandler since: - The subclass would just have a copy of RotatingFileHandler's do

[issue16449] RotatingFileHandler rollover doesn't work on QNX shmem filesystems

2012-11-11 Thread Vinay Sajip
Vinay Sajip added the comment: The current implementation was written with an expectation of working rename functionality in the stdlib. As such, while this issue might be categorised as being of type "enhancement", I don't see how you can categorise it as being of type "behaviour". What's th

[issue16449] RotatingFileHandler rollover doesn't work on QNX shmem filesystems

2012-11-11 Thread Phil Connell
Phil Connell added the comment: Serhiy, there are also calls to os.rename in RotatingFileHandler.doRollover -- ___ Python tracker ___

[issue16449] RotatingFileHandler rollover doesn't work on QNX shmem filesystems

2012-11-11 Thread Phil Connell
Phil Connell added the comment: I'm not convinced that it matters whether the rename or move is atomic. Can anyone come up with a quick concrete example? I see two scenarios: 1. The process crashes during a copy in shutils.move(). In this case, some logs will be duplicated across the files i

[issue16449] RotatingFileHandler rollover doesn't work on QNX shmem filesystems

2012-11-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What about the "rotator" attribute. -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-b

[issue16449] RotatingFileHandler rollover doesn't work on QNX shmem filesystems

2012-11-11 Thread Vinay Sajip
Vinay Sajip added the comment: Thanks for the patch, but I'm closing this as 'wontfix', as per the points made by Antoine and David. If you need logging from an embedded system, please consider using one of the socket-based logging handlers, if that's feasible in the specific situation. -

[issue16449] RotatingFileHandler rollover doesn't work on QNX shmem filesystems

2012-11-10 Thread R. David Murray
R. David Murray added the comment: I agree with Antoine. It seems to me that it is very important to the semantics of rollover that the rename be atomic, even if we ignore the issue of existing other readers. If it were not atomic, you might end up with lost log messages. So I don't think t

[issue16449] RotatingFileHandler rollover doesn't work on QNX shmem filesystems

2012-11-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm not sure why you would setup logging on a RAM filesystem (I assume we're talking about normal volatile RAM)? But besides, the big point of using rename() is that it's fast, atomic and won't disrupt existing file handlers pointing to that file. If RotatingF

[issue16449] RotatingFileHandler rollover doesn't work on QNX shmem filesystems

2012-11-10 Thread Phil Connell
Changes by Phil Connell : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue16449] RotatingFileHandler rollover doesn't work on QNX shmem filesystems

2012-11-10 Thread Phil Connell
New submission from Phil Connell: logging.handlers.RotatingFileHandler.doRollover fails on QNX /dev/shmem filesystems (seen on a 6.4.0-based system). QNX RAM filesystems don't support rename() (see http://www.qnx.com/developers/docs/6.4.0/neutrino/sys_arch/fsys.html#DEVSHMEM - it's a 'big fil