mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-26 20:38:25 +00:00
Enable building with CS_ENABLE_STDIO=0
h/t @kzyapkov PUBLISHED_FROM=d15a5a0057f69f2f755af6436e676b1b179d069d
This commit is contained in:
1 parent
10c274c774
commit
5b2eb4f0e1
1 file changed
+8
-1
+8
-1
@@ -582,6 +582,8 @@ enum cs_log_level cs_log_threshold WEAK =
|
|||||||
static char *s_filter_pattern = NULL;
|
static char *s_filter_pattern = NULL;
|
||||||
static size_t s_filter_pattern_len;
|
static size_t s_filter_pattern_len;
|
||||||
|
|
||||||
|
void cs_log_set_filter(const char *pattern) WEAK;
|
||||||
|
|
||||||
#if CS_ENABLE_STDIO
|
#if CS_ENABLE_STDIO
|
||||||
|
|
||||||
FILE *cs_log_file WEAK = NULL;
|
FILE *cs_log_file WEAK = NULL;
|
||||||
@@ -592,7 +594,6 @@ double cs_log_ts WEAK;
|
|||||||
|
|
||||||
enum cs_log_level cs_log_cur_msg_level WEAK = LL_NONE;
|
enum cs_log_level cs_log_cur_msg_level WEAK = LL_NONE;
|
||||||
|
|
||||||
void cs_log_set_filter(const char *pattern) WEAK;
|
|
||||||
void cs_log_set_filter(const char *pattern) {
|
void cs_log_set_filter(const char *pattern) {
|
||||||
free(s_filter_pattern);
|
free(s_filter_pattern);
|
||||||
if (pattern != NULL) {
|
if (pattern != NULL) {
|
||||||
@@ -647,6 +648,12 @@ void cs_log_set_file(FILE *file) {
|
|||||||
cs_log_file = file;
|
cs_log_file = file;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
void cs_log_set_filter(const char *pattern) {
|
||||||
|
(void) pattern;
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* CS_ENABLE_STDIO */
|
#endif /* CS_ENABLE_STDIO */
|
||||||
|
|
||||||
void cs_log_set_level(enum cs_log_level level) WEAK;
|
void cs_log_set_level(enum cs_log_level level) WEAK;
|
||||||
|
|||||||
Reference in new issue
Block a user