Project

Profile

Help

Issue #2315

closed

Better logging at INFO level

Added by mhrivnak over 7 years ago. Updated about 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version - Nectar:
Platform Release:
2.13.1
Target Release - Nectar:
1.5.4
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
Yes
Tags:
Pulp 2
Sprint:
Sprint 13
Quarter:

Description

Downloads are currently logged at the DEBUG level, but a number of users have requested that they be logged at INFO.

The streamer already logs them at INFO, and a good discussion was had about that behavior where those involved came to consensus. A similar example that comes to mind is MTAs, where each email coming and going normally gets logged at INFO.

This would be done in two modules. HTTPThreadedDownloader and LocalFileDownloader. For example, here are some links to these where DEBUG logging currently takes place:

https://github.com/pulp/nectar/blob/4fe7327c4ad1bb2f8c040b75d80306ee047de615/nectar/downloaders/threaded.py#L267
https://github.com/pulp/nectar/blob/4fe7327c4ad1bb2f8c040b75d80306ee047de615/nectar/downloaders/local.py#L161

Implementation Details

It might make more sense to log right before calling the success and failure handlers, but that might miss the download_one workflow. That detail aside, I would imagine something like:

log.info('Download succeeded: {url}')

or

log.info('Download failed: {url}')

Related issues

Related to Pulp - Issue #2836: Pulp makes a wall of logs during syncCLOSED - WONTFIXActions
Actions #1

Updated by bmbouter over 7 years ago

  • Description updated (diff)

If we're doing this for the HTTPThreadedDownloader, we should also make similar changes in LocalFileDownloader[0]. I've edited the description to include links to both modules.

Also if this is a new Feature for nectar, that would mean this would come as a new nectar Y release right? Does the scope of this issue also include building and releasing the new nectar? If not, we need to make another issue to track that.

Since I made changes to the scope I'm not going to groom it myself.

[0]: https://github.com/pulp/nectar/blob/4fe7327c4ad1bb2f8c040b75d80306ee047de615/nectar/downloaders/local.py#L25

Actions #2

Updated by mhrivnak over 7 years ago

I don't see changing the log level as a new feature. It's a slight modification to an existing behavior. Adding the same log statement to a new part of the code is an expansion of the behavior, but making a new Y release of nectar for this strikes me as overkill. In semver lingo, I wouldn't call log statements part of a "public API".

Actions #3

Updated by bmbouter over 7 years ago

  • Tracker changed from Story to Issue
  • Subject changed from As a user, I can see downloads logged at INFO to Better logging at INFO level
  • Severity set to 2. Medium
  • Triaged set to No

mhrivnak: that sounds fine. I retitled it and switched its tracker to being an issue which makes sense I think. If this looks good to you, feel free to groom it or revert them.

Actions #4

Updated by bizhang over 7 years ago

  • Sprint/Milestone set to 31
  • Triaged changed from No to Yes
Actions #5

Updated by daviddavis over 7 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to daviddavis
Actions #6

Updated by daviddavis over 7 years ago

Actions #7

Updated by daviddavis over 7 years ago

Actions #8

Updated by daviddavis over 7 years ago

Actions #9

Updated by daviddavis over 7 years ago

Actions #10

Updated by daviddavis over 7 years ago

  • Status changed from ASSIGNED to POST

Added by daviddavis over 7 years ago

Revision 66ce1c62 | View on GitHub

Better logging at INFO level for downloads

Instead of showing success/error messages at debug level, we're now showing them at INFO. If the error message was at a level above INFO, I left it as is.

fixes #2315 https://pulp.plan.io/issues/2315

Actions #11

Updated by daviddavis over 7 years ago

  • Status changed from POST to MODIFIED
Actions #12

Updated by bizhang almost 7 years ago

  • Platform Release set to 2.13.1
  • Target Release - Nectar set to 1.5.4
Actions #13

Updated by bizhang almost 7 years ago

  • Status changed from MODIFIED to 5
Actions #14

Updated by bizhang almost 7 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE
Actions #15

Updated by daviddavis almost 7 years ago

  • Related to Issue #2836: Pulp makes a wall of logs during sync added
Actions #16

Updated by bmbouter about 6 years ago

  • Sprint set to Sprint 13
Actions #17

Updated by bmbouter about 6 years ago

  • Sprint/Milestone deleted (31)
Actions #18

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF