diff options
| author | Simon Rettberg | 2017-11-07 16:19:40 +0100 |
|---|---|---|
| committer | Simon Rettberg | 2017-11-07 16:19:40 +0100 |
| commit | 7185af659a7b68477400d3544e481353c11f5b82 (patch) | |
| tree | b5ae54c62cb949ed53e63687894ad90ee66a6787 /src/shared/log.c | |
| parent | [FUSE] Reset salen before getpeername() call (diff) | |
| download | dnbd3-7185af659a7b68477400d3544e481353c11f5b82.tar.gz dnbd3-7185af659a7b68477400d3544e481353c11f5b82.tar.xz dnbd3-7185af659a7b68477400d3544e481353c11f5b82.zip | |
[SHARED] Add log_hasMask() to check if a certain loglevel is set
Diffstat (limited to 'src/shared/log.c')
| -rw-r--r-- | src/shared/log.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/shared/log.c b/src/shared/log.c index 62b104e..701bc89 100644 --- a/src/shared/log.c +++ b/src/shared/log.c @@ -41,6 +41,11 @@ static int logFd = -1; static int writeLevel(char *buffer, logmask_t level); +bool log_hasMask(const logmask_t mask) +{ + return ( ( maskFile | maskCon ) & mask ) == mask; +} + void log_setFileMask(logmask_t mask) { maskFile = mask; |
