Skip to content

Commit 919f7bc

Browse files
peyton-altclaude
andcommitted
fix(import): initialize file logging so the anchor debug line is emitted
Retest caught that logging.Debug is a no-op without logging.Init; import never called it, making the just-added anchor log dead code. Init best-effort like explain/resume. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Entire-Checkpoint: 01KY3A8RAG6E2BFNVZZZYWTGNR
1 parent 4a32e34 commit 919f7bc

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

cmd/entire/cli/import_cmd.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ fails even with --dry-run.`, imp.AgentType()),
5757
}
5858
defer repo.Close()
5959

60+
// Best-effort file logging (like explain/resume): without Init,
61+
// logging.Debug below is a no-op. WorktreeRoot already succeeded,
62+
// so this cannot create .entire/logs/ outside a repo.
63+
logging.SetLogLevelGetter(GetLogLevel)
64+
if err := logging.Init(ctx, ""); err == nil {
65+
defer logging.Close()
66+
}
67+
6068
if err := ensureCheckpointPolicyAllowsCheckpointData(ctx, repo); err != nil {
6169
return err
6270
}

0 commit comments

Comments
 (0)