Skip to content

Remove [Lifecycle] prefix from log messages #95

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

Merged
merged 1 commit into from
May 4, 2021

Conversation

slashmo
Copy link
Contributor

@slashmo slashmo commented May 2, 2021

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

Can one of the admins verify this patch?

6 similar comments
@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@slashmo
Copy link
Contributor Author

slashmo commented May 2, 2021

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
Copy link
Contributor

tomerd commented May 3, 2021

@swift-server-bot add to allowlist

@tomerd
Copy link
Contributor

tomerd commented May 3, 2021

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
Copy link
Contributor

tomerd commented May 3, 2021

@fabianfett @ktoso @yim-lee opinions?

@fabianfett
Copy link
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
Copy link
Contributor

@ktoso ktoso left a comment

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