kmsquire / Logging.jl

Logging package for julia
Other
43 stars 26 forks source link

Overwriting Base.info and Base.warn #27

Open joshday opened 8 years ago

joshday commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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

zxteloiv commented 8 years ago

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

kmsquire commented 7 years ago

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...)