Skip to content
This repository has been archived by the owner on Nov 29, 2021. It is now read-only.

Add debug level log messages #352

Merged
merged 6 commits into from
Jan 26, 2021

Conversation

jjnicola
Copy link
Member

What:
Add debug level log messages

Why:
For debugging purposes.

How:
Set log level to debug and run a scan.

Checklist:

@jjnicola jjnicola changed the base branch from master to ospd-20.08 January 25, 2021 13:07
@codecov
Copy link

codecov bot commented Jan 25, 2021

Codecov Report

Merging #352 (302aae9) into ospd-20.08 (71e51b7) will increase coverage by 0.15%.
The diff coverage is 88.57%.

Impacted file tree graph

@@              Coverage Diff               @@
##           ospd-20.08     #352      +/-   ##
==============================================
+ Coverage       73.75%   73.91%   +0.15%     
==============================================
  Files              23       23              
  Lines            2576     2603      +27     
==============================================
+ Hits             1900     1924      +24     
- Misses            676      679       +3     
Impacted Files Coverage Δ
ospd/ospd.py 71.68% <86.20%> (+0.45%) ⬆️
ospd/scan.py 92.53% <100.00%> (+0.19%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 71e51b7...302aae9. Read the comment docs.

CHANGELOG.md Outdated
@@ -8,6 +8,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

### Added
- Allow the scanner to update total count of hosts. [#332](https://github.com/greenbone/ospd/pull/332)
- Add more debug logging. [#352](https://github.com/greenbone/ospd/pull/352)
- Set end_time for interrupted scans. [#352](https://github.com/greenbone/ospd/pull/352)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this part be put into another separated PR?

ospd/ospd.py Outdated
def _get_scan_progress_xml(self, scan_id: str):
"""Gets scan_id scan's progress in XML format.

@return: String of scan progress in xml.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be

Suggested change
@return: String of scan progress in xml.
Returns:
String of scan progress in xml.

ospd/ospd.py Outdated
if not is_stopped and progress == ScanProgress.FINISHED:
self.finish_scan(scan_id)
elif not is_stopped:
logger.info(
"%s: Host scan finished. Progress: %d, " "Status: %s",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"%s: Host scan finished. Progress: %d, " "Status: %s",
"%s: Host scan finished. Progress: %d, Status: %s",

This changes will be commited in a separate PR.
Copy link
Contributor

@bjoernricks bjoernricks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow thanks a lot for fixing all docstrings! Looks good now

@bjoernricks bjoernricks merged commit 12cda0d into greenbone:ospd-20.08 Jan 26, 2021
@jjnicola jjnicola deleted the more-log-debug branch May 26, 2021 10:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants