Documentation
¶
Index ¶
- func Get() *slog.Logger
- func Init(useStderr bool)
- func InitWithEnv()
- func LogExecCommand(ctx context.Context, logger *slog.Logger, command string, args []string, ...)
- func LogExecCommandResult(ctx context.Context, logger *slog.Logger, command string, args []string, ...)
- func RedactArgsForLog(args []string) []string
- func Sync()
- func WithContext(ctx context.Context) *slog.Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Init ¶
func Init(useStderr bool)
Init initializes the global logger If useStderr is true, logs will be written to stderr (for stdio mode) If useStderr is false, logs will be written to stdout (for HTTP mode)
func InitWithEnv ¶ added in v0.0.10
func InitWithEnv()
InitWithEnv initializes the logger using environment variables This is a convenience function that defaults to stdout unless KAGENT_USE_STDERR is set
func LogExecCommand ¶
func LogExecCommandResult ¶
func RedactArgsForLog ¶ added in v0.0.15
RedactArgsForLog returns a copy of args with sensitive values redacted for logging. Any value immediately following "--token" is replaced with "<REDACTED>" so tokens are not logged.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.