NASA-AMMOS / AIT-Core

MIT License
45 stars 27 forks source link

Consider adding a switch that disables the standard Config warnings #413

Open nttoole opened 2 years ago

nttoole commented 2 years ago

Ideally for a project, the config.yaml is finely tuned and warnings should not be emitted.

For dev however, we are usually stuck with the same default config.yaml, which means we see these WARNINGS everytime we run AIT:

2022-02-09T15:19:39.982 | WARNING  | AIT_ROOT not set.  Defaulting to "/home/nttoole/dev/ait/ait_encrypt_111621/AIT-DSN"
2022-02-09T15:19:40.061 | WARNING  | Config parameter command.history.filename specifies nonexistent path /home/nttoole/dev/cmdhist.pcap
2022-02-09T15:19:40.062 | WARNING  | Config parameter sequence.directory specifies nonexistent path /home/nttoole/dev/seq
2022-02-09T15:19:40.063 | WARNING  | Config parameter script.directory specifies nonexistent path /home/nttoole/dev/script
...
2022-02-09T15:19:40.066 | WARNING  | Config parameter dsn.cfdp.mib.path specifies nonexistent path /home/nttoole/dev/ait/kmc_cfgs/mib
2022-02-09T15:19:40.067 | WARNING  | Config parameter dsn.cfdp.datasink.outgoing.path specifies nonexistent path /home/nttoole/dev/ait/ait/dsn/cfdp/datasink/outgoing
2022-02-09T15:19:40.067 | WARNING  | Config parameter dsn.cfdp.datasink.incoming.path specifies nonexistent path /home/nttoole/dev/ait/ait/dsn/cfdp/datasink/incoming
2022-02-09T15:19:40.068 | WARNING  | Config parameter dsn.cfdp.datasink.tempfiles.path specifies nonexistent path /home/nttoole/dev/ait/ait/dsn/cfdp/datasink/tempfiles
2022-02-09T15:19:40.068 | WARNING  | Config parameter dsn.cfdp.datasink.pdusink.path specifies nonexistent path /home/nttoole/dev/ait/ait/dsn/cfdp/datasink/pdusink
2022-02-09T15:19:40.069 | WARNING  | Config parameter leapseconds.filename specifies nonexistent path /home/nttoole/dev/ait/kmc_cfgs/leapseconds.dat
2022-02-09T15:19:40.069 | WARNING  | Config parameter data.1553.path specifies nonexistent path /gds/dev/data/mipldevlinux14/2022/2022-040/downlink/1553
2022-02-09T15:19:40.070 | WARNING  | Config parameter data.bad.path specifies nonexistent path /gds/dev/data/mipldevlinux14/2022/2022-040/downlink/bad
2022-02-09T15:19:40.070 | WARNING  | Config parameter data.lehx.path specifies nonexistent path /gds/dev/data/mipldevlinux14/2022/2022-040/downlink/lehx
2022-02-09T15:19:40.071 | WARNING  | Config parameter data.planning.path specifies nonexistent path /gds/dev/data/mipldevlinux14/2022/2022-040/planning
2022-02-09T15:19:40.071 | WARNING  | Config parameter data.sdos.path specifies nonexistent path /gds/dev/data/mipldevlinux14/2022/2022-040/sdos
2022-02-09T15:19:40.072 | WARNING  | Config parameter data.uplink.path specifies nonexistent path /gds/dev/data/mipldevlinux14/2022/2022-040/uplink
2022-02-09T15:19:40.072 | WARNING  | Config parameter data.ats.path specifies nonexistent path /gds/dev/data/mipldevlinux14/2022/2022-040/ats

It would be nice to be able to silence these - especially when running quick demos!

Putting it in the config itself seems dubious, but maybe an ENVAR? Or are those frowned upon?

MJJoyce commented 2 years ago

I'd propose that if we're going to add something here that we consider pulling some of the log functionality into the config so we could, for example, set the log level to something higher than info. It also wouldn't be unreasonable to think about removing some of the default / example config out of the config.yaml files and into the appropriate features documentation and test suite (if it's necessary for them).