simplify logger creation (move logic into a function in main packages)
Ensure logger creation is consistent between Web and Collector Create logger in main, pass down to downstream functions (like gin) In debug mode, print a copy of AppConfig Better debugging for logger.
This commit is contained in:
@@ -13,7 +13,7 @@ import (
|
||||
// Send test notification
|
||||
func SendTestNotification(c *gin.Context) {
|
||||
appConfig := c.MustGet("CONFIG").(config.Interface)
|
||||
logger := c.MustGet("LOGGER").(logrus.FieldLogger)
|
||||
logger := c.MustGet("LOGGER").(*logrus.Entry)
|
||||
|
||||
testNotify := notify.New(
|
||||
logger,
|
||||
|
||||
Reference in New Issue
Block a user