mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-05 23:53:46 +07:00
Enable building with CS_ENABLE_STDIO=0
h/t @kzyapkov PUBLISHED_FROM=d15a5a0057f69f2f755af6436e676b1b179d069d
This commit is contained in:
committed by
Cesanta Bot
parent
10c274c774
commit
5b2eb4f0e1
+8
-1
@@ -582,6 +582,8 @@ enum cs_log_level cs_log_threshold WEAK =
|
||||
static char *s_filter_pattern = NULL;
|
||||
static size_t s_filter_pattern_len;
|
||||
|
||||
void cs_log_set_filter(const char *pattern) WEAK;
|
||||
|
||||
#if CS_ENABLE_STDIO
|
||||
|
||||
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;
|
||||
|
||||
void cs_log_set_filter(const char *pattern) WEAK;
|
||||
void cs_log_set_filter(const char *pattern) {
|
||||
free(s_filter_pattern);
|
||||
if (pattern != NULL) {
|
||||
@@ -647,6 +648,12 @@ void cs_log_set_file(FILE *file) {
|
||||
cs_log_file = file;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
void cs_log_set_filter(const char *pattern) {
|
||||
(void) pattern;
|
||||
}
|
||||
|
||||
#endif /* CS_ENABLE_STDIO */
|
||||
|
||||
void cs_log_set_level(enum cs_log_level level) WEAK;
|
||||
|
||||
Reference in New Issue
Block a user