-
Notifications
You must be signed in to change notification settings - Fork 66
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
EEP! 1 - Standard for the use of logging in Eppy - DRAFT #50
Comments
Can you articulate this a little more. May be flesh out a use case. This may be the start of an EEP! |
EEP!: 1 Abstract The proposal is not that logging is made a requirement, just that logging Rationale In the case of developers, when errors arise, the stack trace often does not This could be followed in real time by viewing the tail of a log file or by For users, a track of what is happening in their program can be useful when A user may also want to refer to more detailed logs to at a later time, Proposed standards
References Copyright |
Jamie, This is an awesome start. Some further thoughts:
Another idea:
|
EEP!I think there should be an exclamation mark after it ! I notice that the copyright is public domain |
Some good suggestions there. I like the idea of a full record of actions. It could be switched on and off as with recording a macro in Excel/Word. It also opens up the possibility of an "undo"/"redo" function if Eppy is used as the backend of an editor. Another benefit of having comprehensive logging/replayability is it makes the whole process of using Eppy auditable, which could be of value to engineers. For making every function log-enabled, this decorator might be a good start. It just needs modifying to include the parameters and return value. Also agree with off by default. The licence credit is exactly the same as you find at the bottom of any PEP. See item 3 on this list. Their other recommendation is an Open Publication Licence which is more restrictive. I see no reason to have a problem with it being reused by others for their logging policies, and if a CC licence encourages that it's fine by me. |
The "undo/redo" for an editor is cool. Now you get it for free with eppy :-) Good thinking about using a decorator.
Of course, in python even simple assignments are really functions.
are called behind the scenes and you can see how eppy overrides it in eppy/bunch_subclass.py |
Regarding the license, you have sensitized me about copyright issues. If PEP is using Public Domain I am good with it for EEP! |
I think this is a great idea, I could use it right about now, and I think it would lower the barrier to entry for new contributors. Great idea, jamiebull1 |
I've started a branch |
Looks like you branched from master It is good to have you roll up your sleeves and get into this. |
Understood. Although it shouldn't cause any conflicts if we keep this is just for the EEP! |
This is now implemented as a draft if anyone wants to take a look. I still need to write some more tests to see how we handle objects being passed into the logs, but this gives an idea of what I was getting at. Usage documentation is in the EEP!. |
I see a
where can I find "pythonjsonlogger". I also see that you use "testfixtures" I have no comments on the EEP! yet :-). I am still digesting it. |
That's "pip install python-json-logger". As for testfixtures, I'd not used them before myself, but searching for a way of testing logging code it came out as the simplest approach. |
Jamie, I did a merge when I checked out It is 4am in the morning and I am not sure how that happened :-( |
I've been thinking that it ought to be sufficient to have a log of all API-level calls to achieve the "playback" function, as well as for repeating actions on a second data set. To do that we'd need to define which functions are counted as part of the API, and which are "internals". That might be something for further down the line though as I think just having a standardised logging module available for developers is of value in itself. |
Looking back at this it also seems to be working as expected. Should I put together a bit of documentation? There's probably something can pulled out of the EEP! |
I find logging really useful when developing. Are there any reasons why there isn't any logging at the moment? The only issue I've come across in the past is difficulty using it in conjunction with multiprocessing (though it's not impossible). That doesn't seem to be an issue in eppy though.
If this sounds useful, would it be possible to start a new branch to start adding logging code? I'm happy to make a logging config module and contribute new logging to bits I touch as I try to find my way around the code a bit better. It may also be useful to have some kind of a standard (or an EEP!) on what level of logging is appropriate for various situations and I can help out with that too.
The text was updated successfully, but these errors were encountered: