Message150164
| Author |
pitrou |
| Recipients |
eric.araujo, eric.smith, exarkun, giampaolo.rodola, meatballhat, milko.krachounov, neologix, olemis, pitrou, tarek, vstinner |
| Date |
2011年12月23日.14:40:41 |
| SpamBayes Score |
2.1471047e-08 |
| Marked as misclassified |
No |
| Message-id |
<1324651196.3388.34.camel@localhost.localdomain> |
| In-reply-to |
<CAH_1eM2HvVYGEf5-T7Oh9vwpjxD9rBws4_-jagokyw1MBJED9Q@mail.gmail.com> |
| Content |
> There's no point in calling fsync() after each write, since data is
> written to a temporary file which won't be visible before rename():
> even if you call fsync() after each write, if the file is not properly
> closed, it won't be committed (i.e.renamed).
Ah, it's a temporary file indeed.
But does that mean you can't inspect your logs in real time? All log
files I have ever seen are available under their final name while they
are still being written to.
> In the meantime, you could do whatever you want with the stream (the
> hypothetical AtomicFile): seek(), read(), etc.
I see. Yes, then an AtomicFile class makes sense (not for logging
though, IMHO :-)).
And I understand your point about it being available in io or some io
submodule (not a 3-level deep one though :-)). Perhaps you want to ask
on python-dev? |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2011年12月23日 14:40:42 | pitrou | set | recipients:
+ pitrou, exarkun, vstinner, eric.smith, giampaolo.rodola, tarek, eric.araujo, olemis, meatballhat, milko.krachounov, neologix |
| 2011年12月23日 14:40:41 | pitrou | link | issue8604 messages |
| 2011年12月23日 14:40:41 | pitrou | create |
|