func startUp() { loggerConfig := gomol.NewConsoleLoggerConfig() consoleLogger, _ := gomol.NewConsoleLogger(loggerConfig) gomol.AddLogger(consoleLogger) gomol.InitLoggers() gomol.Info("Initialized console logger") }
func SendIncomingWebhook(model *IncomingWebhook) (int, error) { payload, err := makePostPayload(model) if err != nil { return 0, err } req, err := makeRequest(Config.WebhookUrl, payload) if err != nil { return 0, err } code, err := sendRequest(req) if err != nil { return 0, err } gomol.Info("Sent an IncomingWebhook") return code, nil }
func cleanUp() { gomol.Info("Shutting down loggers") gomol.ShutdownLoggers() }