Add reference to log_at_level API#160
Add reference to log_at_level API#160Steve Mullerworth (stevemullerworth) merged 4 commits intoMetOffice:mainfrom MatthewHambley:LogAtLevel
log_at_level API#160Conversation
Steve Mullerworth (stevemullerworth)
left a comment
There was a problem hiding this comment.
Couple of minor comments.
| Once initialised :ref:`logging` may proceed as normal. | ||
|
|
||
| When you have logged the last thing you care to log call ``final_logger``. The | ||
| string passed to it is used only to output a final message. This rather |
There was a problem hiding this comment.
Suggest removing the "only", as the underlying function does do other hidden work (shutting down the communicator, for example). For the same reason the "This rather..." sentence should be removed as it may imply that it is not necessary to call final_logger (it may not be necessary, but we would like people to do it).
There was a problem hiding this comment.
Rewritten
| call log_event(log_scratch_space, log_level_debug) | ||
| end if | ||
|
|
||
| Note that there is duplication of ``log_level_debug`` here, if they are not |
There was a problem hiding this comment.
It's a good to note the duplication, but I could imagine that a block could include log_level_trace messages and call subroutines that have log_level_info messages.
I wouldn't labour these points though as they are moderately obvious. I'd suggest "Note that it would be normal to duplicate log_level_debug in the final call to log_event".
There was a problem hiding this comment.
Rewritten. I want to labour it a little to make people stop and think about what they would expect.
Steve Mullerworth (stevemullerworth)
left a comment
There was a problem hiding this comment.
All fine now.
ced2933
into
MetOffice:main
Description
In order to support a common usage pattern around only calculating debug values if they are actually going to be logged, an addition has been made to the logging API. This change documents that.
Closes #134
Linked issues
The API change is implemented in ticket 4682 of the core repository.
Type of change
How has this been tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.
Checklist:
Reasoning on why any of the above boxes have not been checked
This is a documentation only change.
Review Checks (To be filled in by the reviewer/s)