Setup (logging/logging.go)

sortie · internal/logging/logging.go · go · Apache-2.0
infra, tag:knn-classified

Configures slog logger with JSON/text formats and context fields for issues and sessions.

// Source: https://github.com/sortie-ai/sortie | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
// Package logging provides structured logging primitives for the Sortie
// orchestrator. It configures the process-wide [log/slog] default and
// supplies composable constructors for sub-loggers that carry the
// context fields required by every issue-related and session-related
// log line: issue_id, issue_identifier, and session_id.
package logging

import (
	"fmt"
	"io"
	"log/slog"
	"strings"

	"github.com/sortie-ai/sortie/internal/redact"
)

// Format controls the output encoding of the process-wide logger.
type Format string

const (
	// FormatText selects key=value text output via

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key