func InitializeLogger(developerModeFlag bool) {
	logger = log.New()

	if developerModeFlag {
		customFormatter := new(log.TextFormatter)
		customFormatter.FullTimestamp = true
		customFormatter.TimestampFormat = "2006-01-02 15:04:05"
		log.SetFormatter(customFormatter)

		log.SetLevel(log.DebugLevel)
		logger.Level = log.DebugLevel
		logger.Formatter = customFormatter
	} else {
		customFormatter := new(log.JSONFormatter)
		customFormatter.TimestampFormat = "2006-01-02 15:04:05"

		log.SetFormatter(customFormatter)
		customFormatter.DisableTimestamp = false

		log.SetLevel(log.InfoLevel)
		logger.Level = log.InfoLevel
		logger.Formatter = customFormatter
	}

	logger.Out = os.Stdout

}
// InitializeLogger creates a default logger whose ouput format, log level differs
// depending of whether the developer mode flag is enable/disabled.
InitializeLogger creates a default logger whose ouput format, log level differs
depending of whether the developer mode flag is enable/disabled.
// InitializeLogger creates a default logger whose ouput format log level differs // depending of whether the developer mode flag is enable / disabled .
func InitializeLogger(developerModeFlag bool) {
	logger = log.New()
	if developerModeFlag {
		customFormatter := new(log.TextFormatter)
		customFormatter.FullTimestamp = true
		customFormatter.TimestampFormat = "2006-01-02 15:04:05"
		log.SetFormatter(customFormatter)
		log.SetLevel(log.DebugLevel)
		logger.Level = log.DebugLevel
		logger.Formatter = customFormatter
	} else {
		customFormatter := new(log.JSONFormatter)
		customFormatter.TimestampFormat = "2006-01-02 15:04:05"
		log.SetFormatter(customFormatter)
		customFormatter.DisableTimestamp = false
		log.SetLevel(log.InfoLevel)
		logger.Level = log.InfoLevel
		logger.Formatter = customFormatter
	}
	logger.Out = os.Stdout
}
func InitializeLogger ( developerModeFlag bool ) { logger = log . New ( ) if developerModeFlag { customFormatter := new ( log . TextFormatter ) customFormatter . FullTimestamp = true customFormatter . TimestampFormat = " " log . SetFormatter ( customFormatter ) log . SetLevel ( log . DebugLevel ) logger . Level = log . DebugLevel logger . Formatter = customFormatter } else { customFormatter := new ( log . JSONFormatter ) customFormatter . TimestampFormat = " " log . SetFormatter ( customFormatter ) customFormatter . DisableTimestamp = false log . SetLevel ( log . InfoLevel ) logger . Level = log . InfoLevel logger . Formatter = customFormatter } logger . Out = os . Stdout }
InitializeLogger creates a default logger whose ouput format, log level differs
depending of whether the developer mode flag is enable/disabled.
InitializeLogger creates a default logger whose ouput format log level differs depending of whether the developer mode flag is enable / disabled .