emoss08 / Trenova

An Open Source AI-driven asset based transportation management system
http://trenova.app
Other
24 stars 5 forks source link

Add: Better logging #245

Closed emoss08 closed 5 months ago

emoss08 commented 5 months ago

Currently the logging for trenova is subpar, as the application is currently in active development, however I've already added logging to be initialized on the startup of the application. Unfortuntately, we'll have to go file by file and ensure that all current errors are being wrapped using eris and logrus.

Example:

current, err := r.client.CommentType.Get(ctx, commentType.ID)
if err != nil {
    wrappedErr := eris.Wrap(err, "failed to retrieve comment type")
    r.logger.WithField("error", wrappedErr).Error("failed to retrieve comment type")
    return nil, wrappedErr
}
repo-ranger[bot] commented 5 months ago

Congratulations! This issue has been included in the next release! Closing in 15 seconds . . .