Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
1904ecc1
Commit
1904ecc1
authored
May 11, 2009
by
antirez
Browse files
timestamp in log lines
parent
74077975
Changes
1
Hide whitespace changes
Inline
Side-by-side
redis.c
View file @
1904ecc1
...
@@ -556,7 +556,12 @@ void redisLog(int level, const char *fmt, ...)
...
@@ -556,7 +556,12 @@ void redisLog(int level, const char *fmt, ...)
va_start
(
ap
,
fmt
);
va_start
(
ap
,
fmt
);
if
(
level
>=
server
.
verbosity
)
{
if
(
level
>=
server
.
verbosity
)
{
char
*
c
=
".-*"
;
char
*
c
=
".-*"
;
fprintf
(
fp
,
"%c "
,
c
[
level
]);
char
buf
[
64
];
time_t
now
;
now
=
time
(
NULL
);
strftime
(
buf
,
64
,
"%d %b %H:%M:%S"
,
gmtime
(
&
now
));
fprintf
(
fp
,
"%s %c "
,
buf
,
c
[
level
]);
vfprintf
(
fp
,
fmt
,
ap
);
vfprintf
(
fp
,
fmt
,
ap
);
fprintf
(
fp
,
"
\n
"
);
fprintf
(
fp
,
"
\n
"
);
fflush
(
fp
);
fflush
(
fp
);
...
...
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