Add a note about the assumptions made by Log::writeToStream() with respect to multiple logging processes' clobbering each other's output.

This commit is contained in:
Robert Knight 2011-09-02 23:41:02 +01:00
parent 9c260bc114
commit e9c94e99ad
1 changed files with 6 additions and 0 deletions

View File

@ -31,6 +31,12 @@ void Log::open(const std::string& path)
void Log::writeToStream(std::ostream& stream, Type type, const char* text)
{
// Multiple processes may be writing to the same log file during
// an update. No attempt is made to synchronize access to the file.
//
// Under Unix, appends to a single file on a local FS by multiple writers should be atomic
// provided that the length of 'text' is less than PIPE_BUF
//
switch (type)
{
case Info: