feat(workflow-executor): configurable log level via LOG_LEVEL env (PRD-407)#1624
Open
nbouliol wants to merge 1 commit into
Open
feat(workflow-executor): configurable log level via LOG_LEVEL env (PRD-407)#1624nbouliol wants to merge 1 commit into
nbouliol wants to merge 1 commit into
Conversation
…D-407] Align Logger with @forestadmin/agent shape (function signature, capitalized LoggerLevel) and add a minimum-level filter on the source. Default Info preserves current behavior; CLI reads LOG_LEVEL, library consumers pass loggerLevel in ExecutorOptions. fixes PRD-407 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
10 new issues
|
|
Coverage Impact Unable to calculate total coverage change because base branch coverage was not found. Modified Files with Diff Coverage (16) 🤖 Increase coverage with AI coding...🚦 See full report on Qlty Cloud » 🛟 Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Loggershape with@forestadmin/agentconvention: function signature(level: LoggerLevel, message: string, context?: Record<string, unknown>) => void, capitalizedLoggerLevel = 'Debug' | 'Info' | 'Warn' | 'Error'. Structuredcontextobject preserved (executor extension, agent only carrieserror?).createConsoleLogger(minLevel)/createPrettyLogger(minLevel)factories filter at the source — calls below the threshold are dropped before any IO.LOG_LEVELenv var (validated via zod, throwsConfigurationErroron invalid value). DefaultInfopreserves current behavior. Library consumers passloggerLevelonExecutorOptions.printHelpandexample/.env.executors.exampleupdated.Test plan
console-logger.test.ts,pretty-logger.test.ts)pickLoggerLOG_LEVEL=Warn node dist/cli.js --in-memory --prettyshould drop Info linesfixes PRD-407
🤖 Generated with Claude Code
Note
Add configurable log level to workflow-executor via
LOG_LEVELenv variableLoggerinterface (info/warn/errormethods) with a callable function type(level, message, context?) => voidwith levels'Debug' | 'Info' | 'Warn' | 'Error'in logger-port.ts.ConsoleLogger/PrettyLoggerwith factory functionscreateConsoleLogger(minLevel)andcreatePrettyLogger(minLevel)that filter messages below the configured minimum level.parseLoggerLevelEnvin cli-core.ts to parse and validateLOG_LEVEL, throwing aConfigurationErroron invalid values; defaults to'Info'.ExecutorOptions.loggerLevelso all executor components share the same configured threshold.LOG_LEVELare now silently dropped; the default threshold is'Info', so'Debug'messages are suppressed by default.Macroscope summarized 379d933.