You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lohpi uses logrus to output logs with different logging levels. We should enhance the logging by using the logrus.WithFields type. This enables us to use structured formats when logging events. Further, all logging should be outputted to logfiles.
Normally, when we import log "github.com/sirupsen/logrus" it is used statically. If it is instantiated, it is advised to use it as a global variable. We should take a look at creating a logrus instance that is accessible in each of the packages that imports it. See logrus.New(). The instance should be enabled with logrus.WithFields and called with those fields available.
The following is a list of events that must be logged in a structured format:
All incoming HTTP requests.
All HTTP-related events that require attention.
All error values.
The bootstrapping process and all configuration being used (excluding database connection string and other Azure Key Vault data).
Graceful shutdown of all resources.
Sending and receiving of Ifrit messages and gRPC messages.
The text was updated successfully, but these errors were encountered:
Lohpi uses logrus to output logs with different logging levels. We should enhance the logging by using the
logrus.WithFields
type. This enables us to use structured formats when logging events. Further, all logging should be outputted to logfiles.Normally, when we import
log "github.com/sirupsen/logrus"
it is used statically. If it is instantiated, it is advised to use it as a global variable. We should take a look at creating alogrus
instance that is accessible in each of the packages that imports it. Seelogrus.New()
. The instance should be enabled withlogrus.WithFields
and called with those fields available.The following is a list of events that must be logged in a structured format:
error
values.The text was updated successfully, but these errors were encountered: