feat(workflow-executor): configurable log level via LOG_LEVEL env (PRD-407)#1624
Open
nbouliol wants to merge 3 commits into
Open
feat(workflow-executor): configurable log level via LOG_LEVEL env (PRD-407)#1624nbouliol wants to merge 3 commits into
nbouliol wants to merge 3 commits into
Conversation
10 new issues
|
…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>
…failure [PRD-407] - cli-core: LOG_LEVEL env var → loggerLevel (valid values, default fallback, empty string fallback, invalid values throw ConfigurationError) - mcp-step-executor: when persisting formattedResponse fails, step still returns success and an Error log carries the enriched-save failure cause Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
233bda2 to
5a71569
Compare
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 varLoggerinterface (with.info/.warn/.errormethods) with a single callableLogger(level, message, context?)function type in logger-port.ts, wherelevelis'Debug' | 'Info' | 'Warn' | 'Error'.ConsoleLoggerandPrettyLoggerclasses withcreateConsoleLogger(minLevel)andcreatePrettyLogger(minLevel)factory functions that filter out messages below the configured level.parseLoggerLevelEnvto cli-core.ts to parse and validateLOG_LEVELfrom the environment, throwingConfigurationErroron invalid values; defaults to'Info'.loggerLevelas an optional field onExecutorOptionsin build-workflow-executor.ts so the log level can also be set programmatically.Debug | Info | Warn | Error) in .env.executors.example and wiresLOG_LEVELthrough in docker-compose.executors.yml.Loggerimplementations outside this package must be updated to match the new signature.Macroscope summarized 5a71569.