#include <string>
#include <vector>
#include "fileio.h"
-#include "agar_logger.h"
+#include "csp_logger.h"
#include "qt_main.h"
# if defined(Q_OS_WIN)
# include <windows.h>
config.log_to_syslog = false;
config.log_to_console = true;
- for(int i = 0; i < (256 -32); i++) {
- for(int j = 0; j <8; j++) {
- config.dev_log_to_syslog[i][j] = false;
- config.dev_log_to_console[i][j] = true;
- config.dev_log_recording[i][j] = true;
- }
- }
#endif
}
#if defined(_USE_QT)
config.log_to_syslog = MyGetPrivateProfileBool(_T("Emulator"), _T("WriteToSyslog"), config.log_to_syslog, config_path);
config.log_to_console = MyGetPrivateProfileBool(_T("Emulator"), _T("WriteToConsole"), config.log_to_console, config_path);
- for(int ii = 0; ii < (256 - 32); ii++) {
+ for(int ii = 0; ii < (CSP_LOG_TYPE_VM_DEVICE_END - CSP_LOG_TYPE_VM_DEVICE_0 + 1); ii++) {
uint32_t flags = 0;
flags = MyGetPrivateProfileInt(_T("Emulator"), create_string(_T("SyslogEnabled%d"), ii), 0x0000, config_path);
for(int jj = 0; jj < 8; jj++) {
csp_logger->set_device_node_log(ii, 2, jj, config.dev_log_to_console[ii][jj]);
flags >>= 1;
}
- flags = MyGetPrivateProfileInt(_T("Emulator"), create_string(_T("RecordLogEnabled%d"), ii), 0x00, config_path);
+ flags = MyGetPrivateProfileInt(_T("Emulator"), create_string(_T("RecordLogEnabled%d"), ii), 0xffff, config_path);
for(int jj = 0; jj < 8; jj++) {
config.dev_log_recording[ii][jj] = ((flags & 0x0001) != 0) ? true : false;
csp_logger->set_device_node_log(ii, 0, jj, config.dev_log_recording[ii][jj]);
}
}
#endif
-#if defined(_USE_QT) && !defined(Q_OS_WIN)
+#if defined(_USE_QT)
csp_logger->debug_log(CSP_LOG_INFO, CSP_LOG_TYPE_GENERAL, "Read config done.");
#endif
}
MyWritePrivateProfileBool(_T("Emulator"), _T("WriteToSyslog"), config.log_to_syslog, config_path);
MyWritePrivateProfileBool(_T("Emulator"), _T("WriteToConsole"), config.log_to_console, config_path);
- for(int ii = 0; ii < (256 - 32); ii++) {
+ for(int ii = 0; ii < (CSP_LOG_TYPE_VM_DEVICE_END - CSP_LOG_TYPE_VM_DEVICE_0 + 1); ii++) {
uint32_t flags = 0;
flags = 0;
for(int jj = 0; jj < 8; jj++) {