summaryrefslogtreecommitdiffstats
path: root/src/Logging.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Logging.cpp')
-rw-r--r--src/Logging.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Logging.cpp b/src/Logging.cpp
index f95df0e..8290ca0 100644
--- a/src/Logging.cpp
+++ b/src/Logging.cpp
@@ -124,7 +124,11 @@ void CLogger::_setLevel(int id, log_level m_eLevel)
void CLogger::setOutputScreen(int fd, log_level m_eLevel)
{
_assureIsInitialized();
- clog_set_fd(0, fd);
+ if(fd==1||fd==2){
+ clog_set_fd(0, fd);
+ }else{
+ error(__FILE__,__LINE__,"Invalid file descriptor");
+ }
_setLevel(0,m_eLevel);
}