cloud-functions-emulator icon indicating copy to clipboard operation
cloud-functions-emulator copied to clipboard

Logs should be in local timezone (and seem to have too many new lines?)

Open jasonpolites opened this issue 8 years ago • 1 comments

Description

I think it would be simpler if logs were in my local (machine) timezone. I can't think of a reason to have them in GMT. Also there seems to be an extra new line character?

2017-03-05T02:48:49.193Z - info: User function triggered, starting execution

2017-03-05T02:48:49.416Z - info: Execution took 206 ms, user function completed successfully

2017-03-05T02:48:49.425Z - info: User function triggered, starting execution

2017-03-05T02:48:49.448Z - info: User function triggered, starting execution

2017-03-05T02:48:49.554Z - info: User function triggered, starting execution

2017-03-05T02:48:49.558Z - info: User function triggered, starting execution

jasonpolites avatar Mar 05 '17 06:03 jasonpolites

Probably something like https://github.com/winstonjs/winston#custom-log-format for the fixing timestamp.

The extra newline is an artifact of the mismatch between child process stdout being piped to the parent, and the winston logger used by the Emulator. I haven't prioritized the newline enough to spend the time to dig into it further to find the right fix.

jmdobry avatar Mar 05 '17 07:03 jmdobry