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

Overwriting Base.info and Base.warn #27

Open
joshday opened this issue Nov 13, 2015 · 5 comments
Open

Overwriting Base.info and Base.warn #27

joshday opened this issue Nov 13, 2015 · 5 comments

Comments

@joshday
Copy link

joshday commented Nov 13, 2015

I would like to use Logging in a package, but import Logging overwrites Base.info and Base.warn, which I don't want to enforce on users. Could this be reconsidered?

@aviks
Copy link
Collaborator

aviks commented Nov 13, 2015

From the documentation: "By default, Logging.info masks Base.info. However, if Base.info is called before using Logging, info will always refer to the Base version."

Does this help?

@joshday
Copy link
Author

joshday commented Nov 13, 2015

I think that adds confusion. I would like to import Logging into my package OnlineStats.jl, but I don't think I can add a dependency for which I have to warn users about overwriting Base methods.

@lendle
Copy link

lendle commented Dec 13, 2015

What about using different names like nfo and wrn (or something better)?

@zxteloiv
Copy link

I think something like Logging.info() is more acceptable than overwriting the Base.

@kmsquire
Copy link
Owner

kmsquire commented Oct 7, 2016

I think something like Logging.info() is more acceptable than overwriting the Base.

I wish that the package name were shorter, but I generally agree. I'll put forth a pull request which stops exporting all functions, and solicit feedback.

@tkelman, any feedback on perhaps changing the name of this package to Log.jl, so that the logging functions could then be called as

Log.info(...)
Log.warn(...)
Log.error(...)

etc.? Do you think that would be acceptable, or is it taking too much liberty with the name? (I guess that would conflict with the same name being used in Base...)

lostanlen pushed a commit to lostanlen/Logging.jl that referenced this issue Nov 17, 2016
closes kmsquire#27 but is not backwards compatible
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

No branches or pull requests

5 participants