Open yaskevich opened 4 years ago
Adding modules of pino logging framework.
Initial setup: https://github.com/yaskevich/ud-annotatrix/commit/e12534e55b73c0a1782414ad2d42a68db121c3f2
Further extension (WIP – HTTP-requests tracking, Express.js middleware): https://github.com/yaskevich/ud-annotatrix/commit/ab1a836240e5e74a0edda889a59b42bedc257a4d
Module pino-multi-stream
requires changes for proper display of logs in server console (human readable format), I proposed a pull request to the authors: https://github.com/pinojs/pino-multi-stream/pull/28
All logging on server side is done via new logger https://github.com/yaskevich/ud-annotatrix/commit/d50351b383914739d177a429be82da0a946acaa3 – except logging of HTTP-requests which is WIP.
Removed morgan
as being redundant now, custom middleware does its job.
Added forwarded-for
to access user's IP address when the application runs behind a proxy.
Via commit https://github.com/yaskevich/ud-annotatrix/commit/e395d581228d54ac5235553eb12f1137178dd65e
Since the application is quite complex, the logging system should go further than
console.log
that puts everything to server console, andmorgan
with default setup for HTTP.Features which could be of use:
console.log
)