Skip to content

Commit

Permalink
Resolve relative path
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Aug 29, 2014
1 parent 54bfe94 commit 92d3ce1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bin/droonga-http-server
Expand Up @@ -126,7 +126,8 @@ if (options.daemon) {
}

var logger;
if (options.systemLogFile) {
if (options.systemLogFile && options.systemLogFile != '-') {
options.systemLogFile = path.resolve(baseDir, options.systemLogFile);
logger = new winston.Logger({
transports: [
new winston.transports.File({
Expand All @@ -146,6 +147,7 @@ if (options.systemLogFile) {
}

if (options.pidFile) {
options.pidFile = path.resolve(baseDir, options.pidFile);
var fd = fs.openSync(options.pidFile, 'w', 0644);
fs.writeSync(fd, process.pid.toString());
}
Expand Down Expand Up @@ -174,6 +176,7 @@ if (options.accessLogFile) {
flags: 'a',
mode: 0644
};
options.accessLogFile = path.resolve(baseDir, options.accessLogFile);
accessLogStream = fs.createWriteStream(options.accessLogFile,
accessLogStreamOptions);
}
Expand Down

0 comments on commit 92d3ce1

Please sign in to comment.