NODE_ENV = 'production'Things I think we should log at a minimum:
For reference, here's the current output logged from packages/core/src/rpc.ts:
[query:getProducts] HEAD ""
[query:getProducts] SUCCESS 200
[query:getProducts] POST {"params":null}
[query:getProducts] SUCCESS [{"id":1,"handle":"shorts","name":"Shorts","description":"very nice","price":45}]
[query:getProducts] POST {"params":null}
[query:getProducts] SUCCESS [{"id":1,"handle":"shorts","name":"Shorts","description":"very nice","price":45}]
[query:getProducts] POST {"params":null}
[query:getProducts] SUCCESS [{"id":1,"handle":"shorts","name":"Shorts","description":"very nice","price":45}]
[query:getProducts] POST {"params":null}
[query:getProducts] SUCCESS [{"id":1,"handle":"shorts","name":"Shorts","description":"very nice","price":45}]
I read logging code in rpc.ts eariler. No plan to use a logging library like winston https://github.com/winstonjs/winston?
@tsawan Good point, I think we should use a logging library. I don't have opinion on which one.
Using a logging library is related to @merelinguist's work on pretty logging
just checked and winston has very good support for colors (linked with log-levels).
@merelinguist can you please check if it will fit our needs?
@flybayer @tsawan Will look into third party logging solutions when I do the cli stuff.
Hey @merelinguist, could you provide a brief update on if you've started on more CLI logging stuff and when you think you might start/finish?
@flybayer Working on this. I want to create some docs about how we should do logging, so expect a pr for that soon (tomorrow I hope).
Whoever wants to work on this should refer to this new logging file:
@merelinguist this would be amazing to have for the alpha if you're up for doing it? — I know you'd make it look incredible :)
@flybayer Sorry I didn’t see this! I can probably get it done by 6pm gmt?
Most helpful comment
@flybayer @tsawan Will look into third party logging solutions when I do the cli stuff.