Skip to content

Remove [Lifecycle] prefix from log messages#95

Merged
ktoso merged 1 commit into
swift-server:mainfrom
slashmo:remove-log-prefix
May 4, 2021
Merged

Remove [Lifecycle] prefix from log messages#95
ktoso merged 1 commit into
swift-server:mainfrom
slashmo:remove-log-prefix

Conversation

@slashmo

@slashmo slashmo commented May 2, 2021

Copy link
Copy Markdown
Contributor

Motivation:

Since Swift Log 1.3.0, log handlers can include the source of a particular message,
rendering the [Lifecycle] prefix unnecessary.

Modifications:

Removed the [Lifecycle] prefix from all log messages by removing the underlying
log helper and calling out to the Logger itself.

Result:

Log messages written by a log handler which includes the location won't log "Lifecycle" twice.

Related:

Motivation:

Since Swift Log 1.3.0, log handlers can include the source of a particular message,
rendering the [Lifecycle] prefix unnecessary.

Modifications:

Removed the [Lifecycle] prefix from all log messages by removing the underlying
log helper and calling out to the Logger itself.

Result:

Log messages written by a log handler which includes the location wont log "Lifecycle" twice.
@swift-server-bot

Copy link
Copy Markdown

Can one of the admins verify this patch?

6 similar comments
@swift-server-bot

Copy link
Copy Markdown

Can one of the admins verify this patch?

@swift-server-bot

Copy link
Copy Markdown

Can one of the admins verify this patch?

@swift-server-bot

Copy link
Copy Markdown

Can one of the admins verify this patch?

@swift-server-bot

Copy link
Copy Markdown

Can one of the admins verify this patch?

@swift-server-bot

Copy link
Copy Markdown

Can one of the admins verify this patch?

@swift-server-bot

Copy link
Copy Markdown

Can one of the admins verify this patch?

@slashmo

slashmo commented May 2, 2021

Copy link
Copy Markdown
Contributor Author

I created this as a draft for now as I'm not sure how to handle backward compatibility here. Any feedback is highly appreciated!

@tomerd

tomerd commented May 3, 2021

Copy link
Copy Markdown
Contributor

@swift-server-bot add to allowlist

@tomerd

tomerd commented May 3, 2021

Copy link
Copy Markdown
Contributor

personally, I think this is fine without backward compatibility. however if there is a consensus it is important you can make it into a configuration in 'Configuration' so folks can opt-in if they still want it

@tomerd

tomerd commented May 3, 2021

Copy link
Copy Markdown
Contributor

@fabianfett @ktoso @yim-lee opinions?

@fabianfett

Copy link
Copy Markdown
Member

I don't think we need backwards compatibility for this lib. I support this change!

@ktoso
ktoso marked this pull request as ready for review May 4, 2021 02:57

@ktoso ktoso left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM :-)

I'm partial to this change as I suggested/requested @slashmo made the PR but yes, I think that's absolutely the right thing to do 👍

No concerns about compatibility, we don't guarantee stability of log messages like that.

@ktoso
ktoso merged commit 103c143 into swift-server:main May 4, 2021
@ktoso ktoso added this to the 1.0.0-alpha.7 milestone May 4, 2021
@slashmo
slashmo deleted the remove-log-prefix branch May 4, 2021 08:28
@ktoso ktoso modified the milestones: 1.0.0-alpha.7, 1.0.0-alpha8 May 4, 2021
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.

5 participants