Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force one line logs via env #13544

Merged
merged 8 commits into from
Aug 15, 2023
Merged

Force one line logs via env #13544

merged 8 commits into from
Aug 15, 2023

Conversation

timkelty
Copy link
Contributor

@timkelty timkelty commented Aug 10, 2023

Makes it possible to force one line logs, even if dev mode is enabled.

Implemented as CRAFT_LOG_ALLOW_LINE_BREAKS, (to match MonologTarget::allowLineBreaks) but open to suggestions:

CRAFT_SINGLE_LINE_LOGS=1
CRAFT_ONE_LINE_LOG=1
CRAFT_LOG_LINE_BREAKS=0
CRAFT_SINGLE_LINE_LOGGING=1

EDIT: I'm actually reconsidering if we actually need this…if I can use the Composer autoload event, I might be able to DI our Dispatcher in time to change MonologTarget::allowLineBreaks in cloud. @brandonkelly thoughts?

@timkelty timkelty changed the base branch from develop to 4.5 August 10, 2023 20:46
Copy link
Contributor

@bencroker bencroker left a comment

Choose a reason for hiding this comment

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

Just noticed this and wanted to give you a heads-up. I could of course have overlooked something.

src/log/Dispatcher.php Show resolved Hide resolved
@brandonkelly brandonkelly merged commit 539b1b6 into 4.5 Aug 15, 2023
@brandonkelly brandonkelly deleted the force-one-line-logs branch August 15, 2023 08:30
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.

Time fields revert from PM to AM when the user has "Greek" as the selected Formatting Locale in the CP
3 participants