Skip to content

Tweaking the level of the log of a succeeded process #157

Closed

Description

@xaviermarchegay

A client asked us to remove the message logged when the process is finished.

$this->processLogger->info(
"Process {$history->getProcessCode()} succeed",
[
'duration' => $history->getDuration(),
]
);

The reasoning is that when you schedule a import task every hour, chances are that there are no file to import. However, there is still an "INFO" displayed even though the task technically did not do anything at all of value.

image

The idea would be to downgrade the log to DEBUG so that the presence or not of logs in the reports columns would mean something.

image

WDYT?

Activity

  1. VincentChalnot commented on Jan 15, 2025

    @VincentChalnot
    Contributor

    In my opinion if the client only wants to see the errors for his scheduled process then it means the command line in the cron (or other scheduler) should contains the --quiet (-q) flag:
    https://symfony.com/doc/current/console/verbosity.html

  2. xaviermarchegay commented on Jan 15, 2025

    @xaviermarchegay
    MemberAuthor

    @VincentChalnot In this instance, the presence of an INFO log would mean that at least one file was treated by the task. This is why they asked us to remove this specific log because "info: 1" means 0 files treated et "info: 2" means 1 file treated.

  3. VincentChalnot commented on Jan 15, 2025

    @VincentChalnot
    Contributor

    The ProcessManager is not aware of what happens in each task right? Alltough I agree with you that this kind of message could be configured with a custom task according to the need of the process.

  4. xaviermarchegay commented on Jan 15, 2025

    @xaviermarchegay
    MemberAuthor

    One proposed solution would be to be able to configure the level of the messages of the bundle (info or debug).

  5. VincentChalnot commented on Jan 15, 2025

    @VincentChalnot
    Contributor

    Seems like a good compromise but adds complexity. I would advise to deprecate this and force the message as debug for the next big release.

  6. njoubert-cleverage commented on Jan 15, 2025

    @njoubert-cleverage
    Member

    On my mind, there are 2 differents informations :

    • INFO Success at *** : says that process was cronned well and this informations must not been removed
    • [0-n] file(s) processed : missing information (or maybe it is the last column value)
  7. njoubert-cleverage commented on Oct 9, 2026

    @njoubert-cleverage
    Member

    Without UI, this log is the only way to follow processes and must not be default set as debug.
    I propose to add options under clever_age_process:

    • logs:
      • success_level: Info
      • failed_level: Debug
        As ever, options may be override on process if needed.

    success_level is used on Process {$history->getProcessCode()} succeed
    failed_level is used on (new) Process {$history->getProcessCode()} failed

  8. added a commit that references this issue on Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions