diff --git a/src/logging.c b/src/logging.c new file mode 100644 index 0000000..ac7a2a2 --- /dev/null +++ b/src/logging.c @@ -0,0 +1,34 @@ +/***************************************************************************** +# # +# uStreamer - Lightweight and fast MJPG-HTTP streamer. # +# # +# Copyright (C) 2018 Maxim Devaev # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see . # +# # +*****************************************************************************/ + + +#include + +#include + +#include "logging.h" + + +enum log_level_t log_level; + +bool log_colored; + +pthread_mutex_t log_mutex; diff --git a/src/logging.h b/src/logging.h index eade908..dc994ae 100644 --- a/src/logging.h +++ b/src/logging.h @@ -37,16 +37,19 @@ #include "threading.h" -enum { - LOG_LEVEL_INFO, - LOG_LEVEL_PERF, - LOG_LEVEL_VERBOSE, - LOG_LEVEL_DEBUG, -} log_level; +enum log_level_t { + LOG_LEVEL_INFO, + LOG_LEVEL_PERF, + LOG_LEVEL_VERBOSE, + LOG_LEVEL_DEBUG, +}; -bool log_colored; -pthread_mutex_t log_mutex; +extern enum log_level_t log_level; + +extern bool log_colored; + +extern pthread_mutex_t log_mutex; #define LOGGING_INIT { \