Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
a05fa5cd
Commit
a05fa5cd
authored
Nov 05, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
log: no CamelCase
Renamed the variable "logLevel" to "log_threshold".
parent
08aaf57f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
log.c
src/log.c
+8
-6
No files found.
src/log.c
View file @
a05fa5cd
...
...
@@ -35,7 +35,9 @@
#define LOG_DATE_BUF_SIZE 16
#define LOG_DATE_LEN (LOG_DATE_BUF_SIZE - 1)
static
unsigned
int
logLevel
=
LOG_LEVEL_LOW
;
static
unsigned
int
log_threshold
=
LOG_LEVEL_LOW
;
static
int
stdout_mode
=
1
;
static
int
out_fd
=
-
1
;
static
int
err_fd
=
-
1
;
...
...
@@ -75,17 +77,17 @@ void initLog(const int verbose)
setvbuf
(
stdout
,
(
char
*
)
NULL
,
_IONBF
,
0
);
if
(
verbose
)
{
log
Level
=
LOG_LEVEL_DEBUG
;
log
_threshold
=
LOG_LEVEL_DEBUG
;
return
;
}
if
(
!
(
param
=
getConfigParam
(
CONF_LOG_LEVEL
)))
return
;
if
(
0
==
strcmp
(
param
->
value
,
"default"
))
{
log
Level
=
LOG_LEVEL_LOW
;
log
_threshold
=
LOG_LEVEL_LOW
;
}
else
if
(
0
==
strcmp
(
param
->
value
,
"secure"
))
{
log
Level
=
LOG_LEVEL_SECURE
;
log
_threshold
=
LOG_LEVEL_SECURE
;
}
else
if
(
0
==
strcmp
(
param
->
value
,
"verbose"
))
{
log
Level
=
LOG_LEVEL_DEBUG
;
log
_threshold
=
LOG_LEVEL_DEBUG
;
}
else
{
FATAL
(
"unknown log level
\"
%s
\"
at line %i
\n
"
,
param
->
value
,
param
->
line
);
...
...
@@ -130,7 +132,7 @@ void setup_log_output(const int use_stdout)
#define log_func(func,level,fp) \
mpd_printf void func(const char *fmt, ...) \
{ \
if ((int)log
Level
>= level) { \
if ((int)log
_threshold
>= level) { \
va_list args; \
va_start(args, fmt); \
do_log(fp, fmt, args); \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment