solutions-geoprocessing-toolbox icon indicating copy to clipboard operation
solutions-geoprocessing-toolbox copied to clipboard

Unit test harness logging issues

Open csmoore opened this issue 8 years ago • 2 comments
trafficstars

There are some issues with the current unit test logging used by the repo:

  1. Some information is sent to the log file, while other information is sent to console a. This makes getting all the required problem info from the Jenkins/autotest log difficult b. Since you must get information from 2 separate places (console & log file) and also have access to the local machine to check the log (and runs happen on several different target machines based on version)
  2. Both print statements and logging statements are used in the code (and somewhat inconsistently) when this is unnecessary a. Logging statements can just be directed toward multiple "handlers" (file and stdout) b. print statements used throughout the code with if Configuration.DEBUG == True: print(...)

Suggest we:

  • [X] Short term: add logger handler to also direct logger calls to stdout (I have PR for this just need issue to tie to) - this is a higher priority since it is needed to debug autotest issues
  • [ ] Longer term: replace: a. prints with logger.info b. if DEBUG : print with logger.debug

csmoore avatar Oct 26 '17 18:10 csmoore

@csmoore Please comment to provide an update on the progress made on this issue.

lfunkhouser avatar Dec 04 '17 23:12 lfunkhouser

I did the first item ( directed logging to stdout in #636 ) but all the print statements still need changed to log.debug/trace statements.

csmoore avatar Dec 05 '17 12:12 csmoore