HarrisKirk / blue-green-dreams

2 stars 1 forks source link

Proposal for better log output #123

Open chrissound opened 10 months ago

chrissound commented 10 months ago

I have noticed that the logs we currently capture can often be noisy, obscuring its usefulness. I might be beneficial to incorporate some additional structure into our logging system.

There are two scenarios we can consider:

I have not been able to find any existing library or reference implementation that could be used to realize this. Python tools like Celery, Luigi, and Airflow don't seem to solve this specific problem.

Developing such a feature would be potentially time-consuming and thus, likely falls outside the scope of this project.

However, there are more simple alternatives we could try. For example:

We could save log outputs to separate files as opposed to directly to stdout. So each step of the process would have a corresponding log file, such as:

If a command fails, we would fetch the specific step's logs and output it to stdout. In addition, we could keep the metadata (e.g, cluster IP, switch IP, etc.) within a structured file (a json file for example), and then output the concise necessary details once the steps have been completed.