Skip to content

Conversation

GromNaN
Copy link
Member

@GromNaN GromNaN commented Dec 19, 2022

Following #446

The console logger have a map of verbosity => log level that should be configurable with env vars.

Disadvantage: in case of invalid log level, the exception cannot be contextualized with the output verbosity.

The tests in this PR will conflict with #439

$level = Logger::toMonologLevel(is_numeric($level) ? (int) $level : $level);
}
} catch (\Psr\Log\InvalidArgumentException $e) {
throw new InvalidConfigurationException(sprintf(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To keep this validation, we could evaluate the value at build time, but pass the configured value (with env placeholder).

https://github.com/symfony/monolog-bundle/pull/446/files#diff-3ee12206c3b122be4593dbfdb19397c16b3d337f759fad3bde6c785d6f1261c0L50-L75

@GromNaN GromNaN changed the base branch from 4.x to 3.x September 24, 2025 08:18
@GromNaN
Copy link
Member Author

GromNaN commented Sep 24, 2025

Closing as this this removes the validation during the build time. The new only_interactive option would solve the initial issue I had with having a "console" only when running the command manually.

@GromNaN GromNaN closed this Sep 24, 2025
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.

2 participants