Skip to content

Commit

Permalink
add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
XK4MiLX committed Oct 4, 2024
1 parent 9539f2c commit 360db36
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions ZelBack/src/services/appsService.js
Original file line number Diff line number Diff line change
Expand Up @@ -1076,11 +1076,7 @@ async function appMonitor(req, res) {
const authorized = await verificationHelper.verifyPrivilege('appownerabove', req, mainAppName);
if (authorized === true) {
if (appsMonitored[appname]) {
const response = {
lastHour: appsMonitored[appname].oneMinuteStatsStore,
lastDay: appsMonitored[appname].fifteenMinStatsStore,
};

const response = appsMonitored[appname].statsStore;
const appResponse = messageHelper.createDataMessage(response);
res.json(appResponse);
} else throw new Error('No data available');
Expand Down Expand Up @@ -1228,6 +1224,7 @@ function startAppMonitoring(appName) {
if (!appName) {
throw new Error('No App specified');
} else {
log.info('Initialize Monitoring...');
appsMonitored[appName] = {}; // Initialize the app's monitoring object
if (!appsMonitored[appName].statsStore) {
appsMonitored[appName].statsStore = [];
Expand Down

0 comments on commit 360db36

Please sign in to comment.