38 #include "blocxx/BLOCXX_config.h"
46 #ifdef BLOCXX_HAVE_SYS_STAT_H
50 namespace BLOCXX_NAMESPACE
55 using namespace blocxx;
63 m_ok = file.getLock() == 0;
84 typedef blocxx::MultiProcessFileAppender app_t;
86 UInt64 kbytesToBytes(UInt64 max_size)
88 UInt64
const oneK = 1024;
89 UInt64
const biggest = UInt64(-1);
91 max_size == app_t::NO_MAX_LOG_SIZE ? biggest
92 : max_size > biggest / oneK ? biggest
105 UInt32 maxBackupIndex
108 , m_filename(filename)
109 , m_maxFileSize(kbytesToBytes(maxFileSize))
110 , m_maxBackupIndex(maxBackupIndex)
117 String msg =
"Cannot create log file " + filename;
122 String msg =
"Cannot create lock file for log file " + filename +
".lock";
161 String s = formattedMessage +
"\n";