Debug logging uses console.log. It prevents the usage of a logging library like pino in order to implement structured logging like when using GCP's Structured Logging. This makes it more difficult to query logs and set a proper debug log level when deploying into a remotely deployed development environment. It can be an issue when redux is using real APIs instead of local fakes as stand-ins.
Problem
Debug logging uses
console.log
. It prevents the usage of a logging library likepino
in order to implement structured logging like when using GCP's Structured Logging. This makes it more difficult to query logs and set a proper debug log level when deploying into a remotely deployed development environment. It can be an issue when redux is using real APIs instead of local fakes as stand-ins.Possible Solution
Update the
Config
interface to something like:Which would enable users setting debug like:
Such that the log entry "in the cloud" could be the following provided that the message doesn't explicitly include the "with ..." part:
Alternatives
Use
patch-package
to implement the above.Additional context
Clearly this is a nice to have, but would be great for the more enterprise-level environments.