Skip to content

#157 - Configure the level of the end of process logs - #257

Open
njoubert-cleverage wants to merge 1 commit into
mainfrom
157
Open

njoubert-cleverage wants to merge 1 commit into
mainfrom
157

Conversation

@njoubert-cleverage

Copy link
Copy Markdown
Member

Description

Fixes #157, as proposed in this comment: without UI, the Process <code> succeed log is the only way to follow processes, so it stays info by default, but its level can now be configured, and a Process <code> failed log is added.

clever_age_process:
    logs:                          # global defaults
        success_level: info        # default
        failed_level: debug        # default
    configurations:
        app.hourly_import:
            logs:                  # override for this process only
                success_level: debug
  • success_level is used for Process <code> succeed (it was always info).
  • failed_level is used for the new Process <code> failed log, written when a process fails:
    • with an exception (in addition to the existing Critical process failure log);
    • or when it is stopped without exception, e.g. by a StopTask (such a run had no end of process log at all).
  • Both logs have the duration of the process in their context. Levels are validated by the configuration (RFC 5424 severities, as the task log_level).
  • ProcessConfiguration exposes getSuccessLogLevel() / getFailedLogLevel(), and ProcessConfigurationRegistry gets an optional third argument with the default levels.

Checked end-to-end in process-bundle-demo (demo.logs.success_level logs its success as NOTICE, demo.logs.stopped logs Process demo.logs.stopped failed as WARNING, other processes are unchanged).

Requirements

  • Documentation updates
    • Reference
    • Cookbooks
    • Changelog
  • Unit tests

Breaking changes

None: default levels keep the current behavior, the new failed log is debug by default. New constructor arguments are optional.

🤖 Generated with Claude Code

…h the new logs option (global or per process): success_level (default info) for Process <code> succeed, and failed_level (default debug) for the new Process <code> failed log

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tweaking the level of the log of a succeeded process

1 participant