arriven / db1000n

MIT License
1.17k stars 201 forks source link

Fixed log message for prometheus server #536

Closed bogdanprodanj closed 2 years ago

bogdanprodanj commented 2 years ago

Description

This PR fixes an incorrect log printed when the service execution is canceled.

Type of change

How Has This Been Tested?

When stopping the service execution using Ctrl+C incorrect logs are no longer visible.

Before:

^Cterminating
prometheus server   {"error": "http: Server closed"}
failure shutting down prometheus server {"error": "context canceled"}

After:

^Cterminating

Test Configuration

Logs

single http request     {"target": "https://gatemgmt.lamoda.ru/"}
single http request     {"target": "https://affiliates.lamoda.ru/partner/login"}
single http request     {"target": "https://www.biglion.ru/shops/kupons/"}
^Cterminating
➜  db1000n git:(log_fix) 

Screenshots