mirror of
https://github.com/hanzo-git/runner.git
synced 2026-10-30 19:33:27 +00:00
Native runner: module github.com/hanzo-git/runner, wire proto github.com/hanzo-git/actions-proto-go, command git-runner, GIT_* env, git expr context, git_* task-context keys, ghcr.io/hanzoai/runner-ubuntu job images. Derived work — upstream attribution + MIT terms in NOTICE/LICENSE. Co-authored-by: Hanzo Dev <[email protected]>
25 lines
586 B
Go
25 lines
586 B
Go
// Copyright 2024 The Git Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package run
|
|
|
|
import (
|
|
"io"
|
|
|
|
log "github.com/sirupsen/logrus"
|
|
)
|
|
|
|
// NullLogger is used to create a new JobLogger to discard logs. This
|
|
// will prevent these logs from being logged to the stdout, but
|
|
// forward them to the Reporter via its hook.
|
|
type NullLogger struct{}
|
|
|
|
// WithJobLogger creates a new logrus.Logger that will discard all logs.
|
|
func (n NullLogger) WithJobLogger() *log.Logger {
|
|
logger := log.New()
|
|
logger.SetOutput(io.Discard)
|
|
logger.SetLevel(log.TraceLevel)
|
|
|
|
return logger
|
|
}
|