From a2b500a205d007bc4f79ad30f4604c55b8264931 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 6 Aug 2024 22:12:13 +0300 Subject: vnext: move sape logging to debug --- vnext/server/sape.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'vnext') diff --git a/vnext/server/sape.js b/vnext/server/sape.js index cff9b48a..d88ee75a 100644 --- a/vnext/server/sape.js +++ b/vnext/server/sape.js @@ -2,6 +2,8 @@ import { parseStringPromise } from 'xml2js' import axios from 'axios' import { setupCache } from 'axios-cache-interceptor' import config from 'config' +import debug from 'debug' +const log = debug('sape') const token = config.get('service.sape.token') || process.env.SAPE_TOKEN @@ -14,7 +16,7 @@ const token = config.get('service.sape.token') || process.env.SAPE_TOKEN */ export const getLinks = async (uri, sapeCookie) => { if (!token) { - console.warn('Sape is not configured') + log('Sape is not configured') return [] } const response = await sape.get(`http://dispencer-01.sape.ru/code.php?user=${token}&host=juick.com&charset=UTF-8&as_xml=true`) -- cgit v1.2.3