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
e51f7d2c
Commit
e51f7d2c
authored
Mar 28, 2012
by
antirez
Browse files
Fixes for redisLogFromHandler().
parent
be4f8ccc
Changes
1
Show whitespace changes
Inline
Side-by-side
src/redis.c
View file @
e51f7d2c
...
@@ -305,7 +305,7 @@ void redisLogFromHandler(int level, const char *msg) {
...
@@ -305,7 +305,7 @@ void redisLogFromHandler(int level, const char *msg) {
(server.logfile == NULL && server.daemonize)) return;
(server.logfile == NULL && server.daemonize)) return;
fd = server.logfile ?
fd = server.logfile ?
open(server.logfile, O_APPEND|O_CREAT|O_WRONLY, 0644) :
open(server.logfile, O_APPEND|O_CREAT|O_WRONLY, 0644) :
STD
IN
_FILENO
;
STD
OUT
_FILENO;
if (fd == -1) return;
if (fd == -1) return;
ll2string(buf,sizeof(buf),getpid());
ll2string(buf,sizeof(buf),getpid());
write(fd,"[",1);
write(fd,"[",1);
...
@@ -316,7 +316,7 @@ void redisLogFromHandler(int level, const char *msg) {
...
@@ -316,7 +316,7 @@ void redisLogFromHandler(int level, const char *msg) {
write(fd,") ",2);
write(fd,") ",2);
write(fd,msg,strlen(msg));
write(fd,msg,strlen(msg));
write(fd,"\n",1);
write(fd,"\n",1);
close
(
fd
);
if (server.logfile)
close(fd);
}
}
/* Redis generally does not try to recover from out of memory conditions
/* Redis generally does not try to recover from out of memory conditions
...
...
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