AbsaOSS / spot

Aggregate and analyze Spark history, export to elasticsearch, visualize and monitor with Kibana.
Apache License 2.0
5 stars 0 forks source link

Move logging & config files #40

Closed hamc17 closed 3 years ago

hamc17 commented 3 years ago

What is the purpose of the log dir? Maybe logging_config.ini belongs to config dir instead?

The main reason is due to the way that logging is set up, using fileConfig it creates the log files but not a log directory specifically. fileConfig will only create the files, so a directory needs to already exist or be created. With an existing log folder (it could be left empty and the logging config file moved to config) it does not throw an error when trying to create the log files. Though I think this could be looked at again to use default log folders or create new ones in the default locations, e.g. /var/log/spot or something like that for linux based machines, etc

DzMakatun commented 3 years ago

What is the purpose of the log dir? Maybe logging_config.ini belongs to config dir instead?

The main reason is due to the way that logging is set up, using fileConfig it creates the log files but not a log directory specifically. fileConfig will only create the files, so a directory needs to already exist or be created. With an existing log folder (it could be left empty and the logging config file moved to config) it does not throw an error when trying to create the log files. Though I think this could be looked at again to use default log folders or create new ones in the default locations, e.g. /var/log/spot or something like that for linux based machines, etc

So maybe:

This way, all configs are in one place. Also, a user would not incidentally delete logging_config.ini if she decides to clean the log dir. What do you think?