-
Notifications
You must be signed in to change notification settings - Fork 148
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
Memento Logging? #218
Comments
This is what I use during testing,
Will this suit your needs as well? |
Hmmm, I'd rather avoid dependencies that haven't been updated in while, but yes, that would work. Would you be willing to create a package level logger[1] that we can configure to avoid any conflicts with other packages that might be using Logging.jl? const LOGGER = Logger("PowerModels") Then we could do |
Yes, I am fine making the currently logger at the package level. I had not realized that Logger has not been updated recently. In fact, I probably have not looked at it for over a year. If you all are committed to continuing to maintain the Memento package, I am open to migrating to it. It looks pretty nice! I noticed that it is not currently passing on v0.7, and plans for when that will be resolved? |
Yeah, most of our internal and external packages depend on Memento, so I don't see us dropping it any time soon. Given that the logging functionality on 0.7 is still pretty limited, I'm guessing we'll be maintaining Memento until at least the Julia v2.0 release. That being said, we do have plans to add base logging integration once 0.7 is release, allowing you to use Memento as a kind of backend to the base logging interface. Currently, we don't prioritize getting tests passing on nightly until a release candidate is available. |
Ok sounds good. One last question, in the interest of keeping PowerModels' dependencies light, is Base logging a viable option as well? |
Yes, but it seems like the configuration options for base logging are fairly limited. If the basic configuration API is provided prior to the 0.7 release then I'd say yes and we could just hook into your logger via that, but I'm not clear on how likely that is at the moment. Here are some of the relevant discussions if you're interested: |
Thanks for the discussion. I am convinced that Memento is our best option for now. As we don't need all of the power of Memento we should revisit this decision later if some basic features make their way into Julia base. A PR is welcome. Or you can suggest how to do the migration to Memento and I'll get to it in the next couple of weeks. |
The migration should be pretty easy and I'm happy make the PR. Unfortunately, we dropped 0.5 a while ago... would you be willing to make 0.6 the minimum julia version supported going forward? |
v0.6 min is fine. We have dropped v0.5 from CI any way. |
Before I close this issue, can you provide a recommendation for how packages like https://github.com/lanl-ansi/PowerModelsAnnex.jl should use Memento? Should they define their own logger, or is it reasonable to piggy back on PowerModels' logger? |
Yeah, I think reusing the PowerModels.jl logger would be fine in that case. It's also fine to have multiple loggers for a package (usually child loggers for submodules). |
Any interest in switching over to using Memento.jl for logging? We're finding that PowerModels.jl throws a lot of warning under some specific circumstances and it would be nice if we could configure PowerModels.jl logging on the application side. We're just using Suppressor.jl for now, but it would be nice if we could have a more flexible solution.
The text was updated successfully, but these errors were encountered: