Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support for a new logs option #48

Closed
wants to merge 1 commit into from
Closed

Adds support for a new logs option #48

wants to merge 1 commit into from

Conversation

leops
Copy link

@leops leops commented Mar 12, 2014

This new option allows you to use files instead of stdout and stderr.
It is defined as follow :

logs: {
out: 'your stdout file',
err: 'your stderr file'
}

If you define one of this options, the server's stdout/stderr will be piped to the file with path.resolve and fs.createWriteStream with the flag 'a'.
If you don't define and option, the output will be redirected to process.stdout like it used to behave.

…r stdout and stderr instead of the console
@paulpflug
Copy link
Collaborator

hi
I just rewrote the io handling (dev branch). There is no problem with piping stdout, but if I pipe stderr, syntax errors will not be catched.
I have to use inherit stderr in Node spawn args to get these errors to the console.
So you mind if only stdout is pipeable to file?

@leops
Copy link
Author

leops commented Aug 15, 2014

I think waiting for the open event of the err writeStream, and then think specifying the file's id instead of process.stderr in stdio should work.

paulpflug added a commit that referenced this pull request Aug 15, 2014
@paulpflug
Copy link
Collaborator

could you have a look at 9a8882b ?

@leops
Copy link
Author

leops commented Aug 15, 2014

That should do it. However it still has the same problem as my PR : createWriteStream throws an error if the folder containing the log files doesn't exist. But a simple call to mkdirp should fix that.

@paulpflug paulpflug mentioned this pull request Aug 17, 2014
Merged
paulpflug added a commit that referenced this pull request Nov 20, 2014
paulpflug added a commit that referenced this pull request Nov 20, 2014
@drawveloper
Copy link
Collaborator

Merged into branch 0.5 along with dev branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants