#2782 closed task (fixed)

wcst_import disabling file logging

Reported by: Dimitar Misev Owned by: Bang Pham Huu
Priority: major Milestone: 10.2
Component: wcst_import Version: 10.2
Keywords: Cc: Peter Baumann
Complexity: Medium

Description

I have a lot of ingredients to import, and would prefer if the import doesn't generate a lot of log files as a side-effect. It's unusual for command-line tools to generate log files without explicitly asking for that anyway.

I think it's best to disable it altogether. Users can redirect stdout to a file if needed.

log_file = None

try:
    log_file = open(ConfigManager.log_file, "a+")
    log_file.write("\n-------------------------------------------------------------------------------------")
    log_file.write(prepend_time("Ingesting coverage '{}'...".format(self.coverage.coverage_id)))
except Exception as e:
    is_loggable = False
    log.warn("\nCannot create log file for this ingestion process, only log to console.")

Change History (3)

comment:1 by Peter Baumann, 14 months ago

why not add an option -v to wcst_import?

"Cannot create log file for this ingestion process, only log to console" is too harsh, sometimes you want it.

comment:2 by Peter Baumann, 14 months ago

…but agreed to have the log output on stdout.

A bigger change, though - users will not get their log files any longer now, so we need to prominently document it in the release notes.

comment:3 by Bang Pham Huu, 14 months ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.