summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Logging.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Logging.cpp b/src/Logging.cpp
index 9011d37..9d7c219 100644
--- a/src/Logging.cpp
+++ b/src/Logging.cpp
@@ -124,8 +124,7 @@ void CLogger::_setLevel(int id, log_level m_eLevel)
void CLogger::setOutputScreen(int fd, log_level m_eLevel)
{
_assureIsInitialized();
- clog_free(0);
- clog_init_fd(0, fd);
+ clog_set_fd(0, fd);
_setLevel(0,m_eLevel);
}
@@ -169,6 +168,11 @@ CLogger::CLogger()
;
}
+bool CLogger::setCallbackScreen(void (*cb)(const char *msg, size_t len)){
+ _assureIsInitialized();
+ return clog_set_cb(0,cb)==0;
+}
+
bool CLogger::m_bEnabledScreen = true;
bool CLogger::m_bEnabledFile = true;
bool CLogger::m_bFileProvided = false;