mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-04-13 03:58:45 +00:00
feat(logging): add option to hide log line source
This is almost certainly going to be a footgun, but it's not too bad of a change to make. If users really do want to make getting support more difficult, so be it. Closes: #1537 Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
@@ -276,7 +276,7 @@ func main() {
|
||||
|
||||
internal.SetHealth("anubis", healthv1.HealthCheckResponse_NOT_SERVING)
|
||||
|
||||
lg := internal.InitSlog(*slogLevel, os.Stderr)
|
||||
lg := internal.InitSlog(*slogLevel, os.Stderr, false)
|
||||
lg.Info("starting up Anubis")
|
||||
|
||||
if *healthcheck {
|
||||
|
||||
@@ -28,7 +28,7 @@ func main() {
|
||||
flagenv.Parse()
|
||||
flag.Parse()
|
||||
|
||||
slog.SetDefault(internal.InitSlog(*slogLevel, os.Stderr))
|
||||
slog.SetDefault(internal.InitSlog(*slogLevel, os.Stderr, false))
|
||||
|
||||
koDockerRepo := strings.TrimSuffix(*dockerRepo, "/"+filepath.Base(*dockerRepo))
|
||||
|
||||
@@ -159,8 +159,8 @@ func run(command string) (string, error) {
|
||||
}
|
||||
|
||||
func setOutput(key, val string) {
|
||||
github_output := os.Getenv("GITHUB_OUTPUT")
|
||||
f, _ := os.OpenFile(github_output, os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0644)
|
||||
fmt.Fprintf(f, "%s=%s\n", key, val)
|
||||
f.Close()
|
||||
github_output := os.Getenv("GITHUB_OUTPUT")
|
||||
f, _ := os.OpenFile(github_output, os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0644)
|
||||
fmt.Fprintf(f, "%s=%s\n", key, val)
|
||||
f.Close()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user