Browse Source

Improve context of logger output

pull/2331/head
Thomas 2 years ago
parent
commit
18754dc639
  1. 10
      apps/api/src/app/info/info.service.ts

10
apps/api/src/app/info/info.service.ts

@ -177,7 +177,7 @@ export class InfoService {
return pull_count; return pull_count;
} catch (error) { } catch (error) {
Logger.error(error, 'InfoService'); Logger.error(error, 'InfoService - DockerHub');
return undefined; return undefined;
} }
@ -195,7 +195,7 @@ export class InfoService {
).text() ).text()
); );
} catch (error) { } catch (error) {
Logger.error(error, 'InfoService'); Logger.error(error, 'InfoService - GitHub');
return undefined; return undefined;
} }
@ -212,7 +212,7 @@ export class InfoService {
return stargazers_count; return stargazers_count;
} catch (error) { } catch (error) {
Logger.error(error, 'InfoService'); Logger.error(error, 'InfoService - GitHub');
return undefined; return undefined;
} }
@ -324,7 +324,7 @@ export class InfoService {
)) as string; )) as string;
const { data } = await got( const { data } = await got(
`https://betteruptime.com/api/v2/monitors/${monitorId}/sla?from=${format( `https://uptime.betterstack.com/api/v2/monitors/${monitorId}/sla?from=${format(
subDays(new Date(), 90), subDays(new Date(), 90),
DATE_FORMAT DATE_FORMAT
)}&to${format(new Date(), DATE_FORMAT)}`, )}&to${format(new Date(), DATE_FORMAT)}`,
@ -340,7 +340,7 @@ export class InfoService {
return data.attributes.availability / 100; return data.attributes.availability / 100;
} catch (error) { } catch (error) {
Logger.error(error, 'InfoService'); Logger.error(error, 'InfoService - Better Stack');
return undefined; return undefined;
} }

Loading…
Cancel
Save