Remove body log
This commit is contained in:
parent
67e3a84168
commit
c197c6edb2
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@astrogd/eu.astrogd.uptime-kuma-push-monitor",
|
"name": "@astrogd/eu.astrogd.uptime-kuma-push-monitor",
|
||||||
"version": "1.0.0-dev.5",
|
"version": "1.0.0-dev.6",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@astrogd/eu.astrogd.uptime-kuma-push-monitor",
|
"name": "@astrogd/eu.astrogd.uptime-kuma-push-monitor",
|
||||||
"version": "1.0.0-dev.5",
|
"version": "1.0.0-dev.6",
|
||||||
"license": "UNLICENSED",
|
"license": "UNLICENSED",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^1.5.0"
|
"axios": "^1.5.0"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@astrogd/eu.astrogd.uptime-kuma-push-monitor",
|
"name": "@astrogd/eu.astrogd.uptime-kuma-push-monitor",
|
||||||
"version": "1.0.0-dev.5",
|
"version": "1.0.0-dev.6",
|
||||||
"description": "Handles uptime kuma push monitor uptime requests",
|
"description": "Handles uptime kuma push monitor uptime requests",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/types/",
|
"types": "dist/types/",
|
||||||
|
@ -12,9 +12,7 @@ export async function sendHeartbeat(url: string, performance?: number, debug: bo
|
|||||||
const response = await axios.get(`${useUrl.origin}/${useUrl.pathname}?status=up&msg=OK${performance ? `&ping=${performance}` : ""}`);
|
const response = await axios.get(`${useUrl.origin}/${useUrl.pathname}?status=up&msg=OK${performance ? `&ping=${performance}` : ""}`);
|
||||||
if (debug)
|
if (debug)
|
||||||
console.log(
|
console.log(
|
||||||
`[eu.astrogd.uptime-kuma-push-monitor] (${new Date().toISOString()}) <${url}>: ${response.status} ${response.statusText} - ${
|
`[eu.astrogd.uptime-kuma-push-monitor] (${new Date().toISOString()}) <${url}>: ${response.status} ${response.statusText}`
|
||||||
response.data.toString()
|
|
||||||
}`
|
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(`[eu.astrogd.uptime-kuma-push-monitor] (${new Date().toISOString()}) <${url}>: ${error}`);
|
console.error(`[eu.astrogd.uptime-kuma-push-monitor] (${new Date().toISOString()}) <${url}>: ${error}`);
|
||||||
@ -33,9 +31,7 @@ export async function sendDownNotification(url: string, msg: string = "Error",de
|
|||||||
const response = await axios.get(`${useUrl.origin}/${useUrl.pathname}?status=DOWN&msg=${msg}`);
|
const response = await axios.get(`${useUrl.origin}/${useUrl.pathname}?status=DOWN&msg=${msg}`);
|
||||||
if (debug)
|
if (debug)
|
||||||
console.log(
|
console.log(
|
||||||
`[eu.astrogd.uptime-kuma-push-monitor] (${new Date().toISOString()}) <${url}>: ${response.status} ${response.statusText} - ${
|
`[eu.astrogd.uptime-kuma-push-monitor] (${new Date().toISOString()}) <${url}>: ${response.status} ${response.statusText}`
|
||||||
response.data.toString()
|
|
||||||
}`
|
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(`[eu.astrogd.uptime-kuma-push-monitor] (${new Date().toISOString()}) <${url}>: ${error}`);
|
console.error(`[eu.astrogd.uptime-kuma-push-monitor] (${new Date().toISOString()}) <${url}>: ${error}`);
|
||||||
|
Loading…
Reference in New Issue
Block a user