+ name = source;
+ fileName = iApp::instance()->logDir() + source + ".log";
+
+ // Set default settings
+ severity = iLogger::Fatal;
+ maxSize = 100 * 1024;
+ maxCount = 3;
+
+ // Read settings from the 'logger.ini' file
+ QString confFileName = iApp::instance()->etcDir() + "logger.ini";
+ if (QFile::exists(confFileName)) {
+ IniFile ini(confFileName, QIODevice::ReadOnly);
+
+ // Default values for all sources
+ maxSize = 1024 * ini.getValue(".default/log_size", maxSize / 1024).toInt();
+ maxCount = ini.getValue(".default/log_count", maxCount).toInt();
+
+ // Default values for this source
+ maxSize = 1024 * ini.getValue(source.toLatin1() + "/log_size", maxSize / 1024).toInt();
+ maxCount = ini.getValue(source.toLatin1() + "/log_count", maxCount).toInt();
+ }