Other: Log message at startup

This commit is contained in:
James Houlahan
2022-10-13 04:08:44 +02:00
parent 2a97939807
commit fba8568474

View File

@ -6,6 +6,7 @@ import (
"net/http/cookiejar" "net/http/cookiejar"
"os" "os"
"path/filepath" "path/filepath"
"runtime"
"github.com/Masterminds/semver/v3" "github.com/Masterminds/semver/v3"
"github.com/ProtonMail/proton-bridge/v2/internal/bridge" "github.com/ProtonMail/proton-bridge/v2/internal/bridge"
@ -204,7 +205,14 @@ func withLogging(c *cli.Context, crashHandler *crash.Handler, locations *locatio
return fmt.Errorf("could not initialize logging: %w", err) return fmt.Errorf("could not initialize logging: %w", err)
} }
// TODO: Add teardown actions (clean the log directory?) logrus.
WithField("appName", constants.FullAppName).
WithField("version", constants.Version).
WithField("revision", constants.Revision).
WithField("build", constants.BuildTime).
WithField("runtime", runtime.GOOS).
WithField("args", os.Args).
Info("Run app")
return fn() return fn()
} }