logger updates
This commit is contained in:
@@ -4,7 +4,7 @@ const fs = require('fs');
|
||||
const path = require('path');
|
||||
const appSettings = require('../config/settings');
|
||||
|
||||
const { getEnv, LLAMACPP } = require('@nexusai/shared');
|
||||
const { getEnv, LLAMACPP, logger } = require('@nexusai/shared');
|
||||
const LLAMA_URL = getEnv('LLAMA_SERVER_URL', LLAMACPP.DEFAULT_URL);
|
||||
|
||||
router.get('/', (req, res) => {
|
||||
@@ -38,7 +38,7 @@ router.get('/', (req, res) => {
|
||||
|
||||
res.json(models);
|
||||
} catch (err) {
|
||||
console.error('[models] Failed to scan folder:', err.message);
|
||||
logger.error('[models] Failed to scan folder:', err.message);
|
||||
res.status(500).json({ error: `Could not read models folder: ${modelsFolderPath}` });
|
||||
}
|
||||
});
|
||||
@@ -53,7 +53,7 @@ router.get('/props', async (req, res) => {
|
||||
modelAlias: data.model_alias,
|
||||
});
|
||||
} catch (err) {
|
||||
console.error('[models/props]', err.message);
|
||||
logger.error('[models/props]', err.message);
|
||||
res.status(503).json({ error: 'Could not reach llama-server' });
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user