summaryrefslogtreecommitdiffstats
path: root/src/Logging.cpp
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2015-11-18 11:26:49 +0100
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2015-11-18 11:26:49 +0100
commite48d0a53730bb7faa2463a64db0989ba341e12b8 (patch)
tree62e06641aea8741a2397b73aa1b1cf175835809e /src/Logging.cpp
parentc39b12fc42a7254bad1e68cbdb948eee0421ad81 (diff)
parentd4d7ae8c560e5511b6453ef8eca220677b504169 (diff)
downloadastra-e48d0a53730bb7faa2463a64db0989ba341e12b8.tar.gz
astra-e48d0a53730bb7faa2463a64db0989ba341e12b8.tar.bz2
astra-e48d0a53730bb7faa2463a64db0989ba341e12b8.tar.xz
astra-e48d0a53730bb7faa2463a64db0989ba341e12b8.zip
Merge branch 'master' into volgeom3d
Diffstat (limited to 'src/Logging.cpp')
-rw-r--r--src/Logging.cpp60
1 files changed, 44 insertions, 16 deletions
diff --git a/src/Logging.cpp b/src/Logging.cpp
index 8290ca0..cd7e3f0 100644
--- a/src/Logging.cpp
+++ b/src/Logging.cpp
@@ -70,37 +70,65 @@ void CLogger::disable()
void CLogger::debug(const char *sfile, int sline, const char *fmt, ...)
{
_assureIsInitialized();
- va_list ap;
- va_start(ap, fmt);
- if(m_bEnabledScreen) clog_debug(sfile,sline,0,fmt,ap);
- if(m_bEnabledFile && m_bFileProvided) clog_debug(sfile,sline,1,fmt,ap);
+ va_list ap, apf;
+ if(m_bEnabledScreen){
+ va_start(ap, fmt);
+ clog_debug(sfile,sline,0,fmt,ap);
+ va_end(ap);
+ }
+ if(m_bEnabledFile && m_bFileProvided){
+ va_start(apf, fmt);
+ clog_debug(sfile,sline,1,fmt,apf);
+ va_end(apf);
+ }
}
void CLogger::info(const char *sfile, int sline, const char *fmt, ...)
{
_assureIsInitialized();
- va_list ap;
- va_start(ap, fmt);
- if(m_bEnabledScreen) clog_info(sfile,sline,0,fmt,ap);
- if(m_bEnabledFile && m_bFileProvided) clog_info(sfile,sline,1,fmt,ap);
+ va_list ap, apf;
+ if(m_bEnabledScreen){
+ va_start(ap, fmt);
+ clog_info(sfile,sline,0,fmt,ap);
+ va_end(ap);
+ }
+ if(m_bEnabledFile && m_bFileProvided){
+ va_start(apf, fmt);
+ clog_info(sfile,sline,1,fmt,apf);
+ va_end(apf);
+ }
}
void CLogger::warn(const char *sfile, int sline, const char *fmt, ...)
{
_assureIsInitialized();
- va_list ap;
- va_start(ap, fmt);
- if(m_bEnabledScreen) clog_warn(sfile,sline,0,fmt,ap);
- if(m_bEnabledFile && m_bFileProvided) clog_warn(sfile,sline,1,fmt,ap);
+ va_list ap, apf;
+ if(m_bEnabledScreen){
+ va_start(ap, fmt);
+ clog_warn(sfile,sline,0,fmt,ap);
+ va_end(ap);
+ }
+ if(m_bEnabledFile && m_bFileProvided){
+ va_start(apf, fmt);
+ clog_warn(sfile,sline,1,fmt,apf);
+ va_end(apf);
+ }
}
void CLogger::error(const char *sfile, int sline, const char *fmt, ...)
{
_assureIsInitialized();
- va_list ap;
- va_start(ap, fmt);
- if(m_bEnabledScreen) clog_error(sfile,sline,0,fmt,ap);
- if(m_bEnabledFile && m_bFileProvided) clog_error(sfile,sline,1,fmt,ap);
+ va_list ap, apf;
+ if(m_bEnabledScreen){
+ va_start(ap, fmt);
+ clog_error(sfile,sline,0,fmt,ap);
+ va_end(ap);
+ }
+ if(m_bEnabledFile && m_bFileProvided){
+ va_start(apf, fmt);
+ clog_error(sfile,sline,1,fmt,apf);
+ va_end(apf);
+ }
}
void CLogger::_setLevel(int id, log_level m_eLevel)