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

Rename logger to logs #1005

Merged
merged 3 commits into from
Jun 23, 2023
Merged

Rename logger to logs #1005

merged 3 commits into from
Jun 23, 2023

Conversation

leighmcculloch
Copy link
Member

@leighmcculloch leighmcculloch commented Jun 22, 2023

What

Rename env.logger() to env.logs().

Why

The logger function is inconsistently named compared to the other functions for accessing resources. E.g. events, storage, ledger. I keep looking for logs and having to remember it is logger. The type is used not just for the act of logging, but also the act accessing logs in tests.

Note that the deploy functionality is under deployer, but it's not one that as easily renamed to deploy or deploys.

The rename is done backwards compatible with a deprecated notice, so folks will get a meaningful warning message and do not need to go hunting for the new function.

@leighmcculloch leighmcculloch marked this pull request as ready for review June 22, 2023 23:27
soroban-sdk/src/logs.rs Outdated Show resolved Hide resolved
@leighmcculloch leighmcculloch enabled auto-merge (squash) June 23, 2023 00:28
@leighmcculloch leighmcculloch merged commit a376685 into main Jun 23, 2023
@leighmcculloch leighmcculloch deleted the logging-logs branch June 23, 2023 01:40
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