Skip to content

Can Level be renamed to LogLevel? #445

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

Closed
jamesderlin opened this issue May 4, 2019 · 5 comments
Closed

Can Level be renamed to LogLevel? #445

jamesderlin opened this issue May 4, 2019 · 5 comments

Comments

@jamesderlin
Copy link
Contributor

jamesderlin commented May 4, 2019

The naming of types seems inconsistent. There's Logger, LogRecord, LoggerHandler... and then there's Level.

I either need to have a somewhat meaningless Level name polluting my global namespace or I need to do:

import 'package:logging/logging.dart' as log;

but then I end up with log.Logger, log.LogRecord, log.LoggerHandler, which looks a bit silly.

I don't know if there's any reasonable way to do anything about this currently, although once dart-lang/sdk#2626 is fixed, I suppose Level could be a (deprecated?) typedef to LogLevel.

@natebosch
Copy link
Member

This is tough because there isn't a good migration story. I'd be hesitant to do it even with a breaking release bump because the churn would be pretty painful.

I do think we should hold on to it, if we do get the ability to add type aliases such that we can have an incremental migration we should consider it.

@natebosch
Copy link
Member

We do have type aliases now.

cc @kevmoo @jakemac53 for opinions on whether it's worth the churn to deprecate Level in favor of LogLevel.

@jakemac53
Copy link
Contributor

IMO no we shouldn't bother, we just end up polluting the namespace further.

Individuals can also set up their own alias easily, if they choose to do so.

@kevmoo
Copy link
Member

kevmoo commented Aug 31, 2022 via email

@jamesderlin
Copy link
Contributor Author

Yeah, I agree.

@mosuem mosuem transferred this issue from dart-archive/logging Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants