diff options
author | Daniel M. Pelt <D.M.Pelt@cwi.nl> | 2015-03-13 17:49:55 +0100 |
---|---|---|
committer | Daniel M. Pelt <D.M.Pelt@cwi.nl> | 2015-03-13 17:49:55 +0100 |
commit | 476fd5388da4aa6e23658460199e26e88e05dc5d (patch) | |
tree | e7388d7823b411ea35216fbc1e9fb8a3307af17a /src/Logging.cpp | |
parent | 35fadf8641b05d357a37e8098b9a801ba0e815b9 (diff) | |
download | astra-476fd5388da4aa6e23658460199e26e88e05dc5d.tar.gz astra-476fd5388da4aa6e23658460199e26e88e05dc5d.tar.bz2 astra-476fd5388da4aa6e23658460199e26e88e05dc5d.tar.xz astra-476fd5388da4aa6e23658460199e26e88e05dc5d.zip |
Only allow stdout and stderr for screen logging
Diffstat (limited to 'src/Logging.cpp')
-rw-r--r-- | src/Logging.cpp | 6 |
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); } |