Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions deployment/clouddeploy/gke-workers/base/gitter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ spec:
env:
- name: GOMEMLIMIT
value: "100GiB"
- name: DEBUG_LOG
value: "true"
volumeMounts:
- mountPath: /work
name: disk-data
Expand Down
6 changes: 6 additions & 0 deletions go/logger/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,14 @@ func initTracing(ctx context.Context, projectID, serviceName string) {
}

func cloudHandlerOptions() *slog.HandlerOptions {
level := slog.LevelInfo
if os.Getenv("DEBUG_LOG") != "" {
level = slog.LevelDebug
}

return &slog.HandlerOptions{
AddSource: true,
Level: level,
ReplaceAttr: func(_ []string, a slog.Attr) slog.Attr {
// Remap "level" to "severity"
if a.Key == slog.LevelKey {
Expand Down
Loading