Skip to content

2.x: Logger pretty newlines#367

Open
RiskoZS wants to merge 3 commits intoSinisterRectus:masterfrom
RiskoZS:2.x-logger-pretty-newlines
Open

2.x: Logger pretty newlines#367
RiskoZS wants to merge 3 commits intoSinisterRectus:masterfrom
RiskoZS:2.x-logger-pretty-newlines

Conversation

@RiskoZS
Copy link
Copy Markdown
Contributor

@RiskoZS RiskoZS commented Jan 8, 2023

2.x backport of #320.

Additionally, unlike #320, this shouldn't introduce breaking changes to the return value of Logger:log().

@SinisterRectus
Copy link
Copy Markdown
Owner

I will review and possibly include this after 2.11.0.

msg = format(msg, ...)

local d = date(self._dateTime)
local prettyfied = msg
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

No need to declare a new var here. Just re-use msg.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I wanted to preserve the original value of msg because it's the value that the method returns, and so it shouldn't include extra formatting.

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