Skip to content
Snippets Groups Projects
Commit 6b79e643 authored by Alan De Smet's avatar Alan De Smet
Browse files

Remove logging.progress

It's no longer needed and it was an over-clever hack. #6
parent 601cd472
No related branches found
No related tags found
No related merge requests found
......@@ -108,21 +108,21 @@ def main():
try:
logging.progress("Acquiring SST")
if args.want_progress: sys.stderr.write("Acquiring SST\n")
sststats = aitf.ancil.SST.download_for_time(args.scan_time, args.cache, do_download = do_download, progress=progress)
sst_files = sststats.all_files()
log_download_report("SST Download Summary", sststats)
# using SST instead of GFS to show that
# DownloadStatistics are interchangable.
logging.progress("Acquiring GFS")
if args.want_progress: sys.stderr.write("Acquiring GFS\n")
gfsstats = aitf.ancil.GFS.download_for_time(args.scan_time, args.cache, do_download = do_download, progress=progress)
gfs_files = gfsstats.all_files()
log_download_report("GFS Download Summary", gfsstats)
log_download_report("Total Download Summary", sststats + gfsstats)
logging.progress("Symbolically linking into place")
if args.want_progress: sys.stderr.write("Symbolically linking into place\n")
all_files = list(sst_files) + list(gfs_files)
for destination in args.destination:
for file in all_files:
......
......@@ -39,7 +39,8 @@ def initialize_logging_level_info():
logging_levels = [ ('warnings', logging.WARNING) ]
# These are from conlog, but I don't want to depend on them.
if hasattr(logging,'SUMMARY'): logging_levels += [ ('a summary', logging.SUMMARY) ]
if hasattr(logging,'PROGRESS'): logging_levels += [ ('progress', logging.PROGRESS) ]
# Not a "real" logging level
logging_levels += [ ('progress', logging_levels[-1][1]) ]
logging_levels += [('general information', logging.INFO),
('debugging information', logging.DEBUG) ]
......
......@@ -44,7 +44,6 @@ def add_console_logging():
labels = {
logging.DEBUG: "debug: ",
logging.INFO: "",
logging.PROGRESS: "",
logging.SUMMARY: "",
logging.WARNING: "Warning: ",
logging.ERROR: "ERROR: ",
......@@ -70,6 +69,5 @@ def add_console_logging():
def setup_logging():
create_log_level(25, "SUMMARY")
create_log_level(22, "PROGRESS")
logging.basicConfig()
add_console_logging()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment