Enable logging to stdout in Python CTA FST GCD
Problem to solve
AARNet runs CTA entirely within Kubernetes, and by default all logging for processes goes to stdout of the container's console. Enable a method by which the ctafstgcd.py daemon logs to stdout rather than a file on disk.
Intended users
AARNet has a specific interest in this, and I believe anyone who runs the process within a container using normal container orchestrators and log collectors would use this. Stdout/stderr logging is a standard practice in a container driven implementation, as mentioned in https://kubernetes.io/docs/concepts/cluster-administration/logging/#logging-at-the-node-level
Further details
@jleduc proposed replicating the use of the --stdout or -s switch from cta-taped for uniformity across the daemons.
This would leave -f (foreground) and -l (log file) unimplemented, however these are also easy enough to resolve as required.
Using a sidecar container is not a desired approach, as this increases complexity, and creates files on disk that then need to be managed by some extra process, despite the existing handler using the TimedRotatingFileHandler method. It does no cleanup presently when running inside a container as part of its own maintenance.
Proposal
I initially showed it working using "-" as the log file configuration value in the configuration file.
Following @jleduc's suggestion, the consistency of command line options with other CTA daemons can be maintained. Modification to the main() function for the command line switch parser, and appropriate conditional logger setup in the get_logger() function would enable this feature.