Closed idoshamun closed 8 years ago
One of your streams is going to have to put a new-line in somewhere. I know https://github.com/hapijs/good-squeeze#safejsonoptions-stringify has a separator
option for this purpose.
What if I want to use good-console, I'm unable to do so if SafeJson attached to the stream? is there any option in good itself to add a line break?
[TypeError: Cannot assign to read only property 'data' of {"event":"log","timestamp":1460961529581,"tags":[],"data":"server running at http://shamun-ubuntu-laptop:3000","pid":19962}
Can you show me your stream pipeline that uses good-console? I can only assume you are writing to process.stdout
. If that's the case, you'll need a transform stream, either your own or a prebuilt one from npm, that appends "\n" to data
in the _transform
method of your stream.
That's exactly what I did. I created a new class which appends \r\n
.
Thinking about publishing it for other developers
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.
Currently when a new log message is written to destination (be it stdout, stderr or a file), it doesn't break the line. All logs are being written to the same line.
Version: 7.0.0-rc1