-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add loggers when reading and writing weights #3233
Conversation
Okay. Good news, it works:
Now, that makes sense since it's the MAPL logger I used. But this is activated by Extdata so we have:
It's weird, but I don't feel right assuming the only thing that calls this will be the ExtData code. @bena-nasa might know more. @tclune Is it good/allowed/okay to make the logger dynamic? That is, we could pass in a string to the call for this and then have the logger be based on the caller? So if say ExtData calls it, we pass in
? Or am I just overthinking this? |
One fundamental issue here is that we have competing rationales for determining the local logger. On the one hand we have the component hierarchy and that serves us reasonably well for the gridcomps. (And even there, I'm not 100% convinced that my "long" name approach is good. Maybe we should let the logger controls be flat. Would not be able to debug entire subtrees.) The other is the library layers where the usual logger approach makes sense. So what do we do when a gridcomp calls a utility layer? We might want to control that from the gridcomp, but that would be difficult. Now I'm going to read the details and provide a more specific response. |
This can be done, but I don't think it is a good idea. It makes the logger too much part of the interface, but we want it to be "behind the scenes". What we should do is decide for any given module what its logger should be. "MAPL" is a fine placeholder. But maybe "MAPL.base" or "MAPL.regridder" or ... For now I'd not worry. In MAPL3 I hope to have a firmer convention. |
@tclune Okay. For now it does seem to work in my testing (as shown above). So I'll undraft |
Types of change(s)
Checklist
make tests
)Description
In the v12 tracking branch, there are prints when reading and writing weight files. This PR brings them to
develop
but makes them pFlogger prints.I'll work with @bena-nasa to make sure they actually work and all.
Related Issue