-
Notifications
You must be signed in to change notification settings - Fork 309
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
Jobs Overhaul: Improve Logging Utilities #2331
Comments
I'd love to get rid of the bespoke logging API for Jobs and just let them use stdlib |
Seems logical. My only request is a convention to still have the same thing. E.g. If you log your system, something like: LOGGER.debug("NAUTOBOT_OBJ: <uuid> NAUTOBOT_DEBUG: Serial number data validation failed on the given object.") You will get the same view that you currently have, in addition to the generic logging |
That would be the tradeoff. Unless we want to use something like |
In the interest of clarity, I am all for using structlog or similar to provide the same functionality, and it becomes an "opt-in" type thing. |
Worth considering as part of #765 |
Need to consider how this intersects with #765 (comment) - the request there as I understand it would be to also have an option for jobs to not capture logs (or at least, not to store them to the database). |
Don't know if it's already covered in some of the related issues, but it would be great to offer, off the shelf, a logging level option, matching the log level messages. |
Worth considering: will #1622 be able to address this with standard available tools (see: https://docs.celeryq.dev/en/stable/userguide/tasks.html#task-logging) Let's discuss a spike after more of #1622 is completed. |
This will be addressed in: #2071 |
If we don't achieve the stretch goal do we need to make the |
Yes, or more generally we need to solve the problem of the existing non- |
The |
Closed with #3799 |
Have spoke with Nautobot core since this was initially closed, but the core of this issue has not addressed as of yet, which is:
I understand there has been adjustments made to the logging facility, but the challenge is always the same, we do not know own the logging for non-Nautobot packages, so if Python requests has an error, we do not control that. The only constant I have found is what has been mentioned in the request of the issue, which is the console of a worker logs (at the time it said debug mode as that was a thing in Nautobot 1.x). |
As ...
Patti - Platform Admin
I want ...
The ability to view all of the logs for a lob, not just the ones that are shown in the logging facility (e.g. self.log_success() )
So that ...
so that I can see full stacktraces and similar issues that I may not otherwise have easy access to.
I know this is done when...
There is a UI and API that provides feedback that is the same as I would see on the console of a worker in debug mode.
Optional - Feature groups this request pertains to.
Database Changes
unknown
External Dependencies
No response
Tasks
Considerations
celery.get_logger
instance which does not implement our custom task database handler. Will probably need to use thetask_prerun
signal to implement thesys.stdout/sys.stderr
redirect.log_object
field functionality, structlog support can be pushed back to a 2.x or beyond feature request (maybe use theextra
kwarg in the stdlib logger methods to pass the object)The text was updated successfully, but these errors were encountered: