debug logging alignment
parent
f6eb3bf550
commit
e09d1ddb5d
4
app.js
4
app.js
|
|
@ -28,7 +28,7 @@ import routerPrint from './routes/print.js';
|
|||
import routerReports from './routes/reports.js';
|
||||
import routerWorkOrders from './routes/workOrders.js';
|
||||
import { version } from './version.js';
|
||||
const debug = Debug(`${DEBUG_NAMESPACE}:app:${process.pid}`);
|
||||
const debug = Debug(`${DEBUG_NAMESPACE}:app:${process.pid.toString().padEnd(5)}`);
|
||||
/*
|
||||
* INITIALIZE APP
|
||||
*/
|
||||
|
|
@ -79,7 +79,7 @@ app.use(session({
|
|||
},
|
||||
secret: configFunctions.getConfigProperty('session.secret'),
|
||||
store: new FileStoreSession({
|
||||
logFn: Debug(`${DEBUG_NAMESPACE}:session:${process.pid}`),
|
||||
logFn: Debug(`${DEBUG_NAMESPACE}:session:${process.pid.toString().padEnd(5)}`),
|
||||
path: './data/sessions',
|
||||
retries: 20
|
||||
}),
|
||||
|
|
|
|||
4
app.ts
4
app.ts
|
|
@ -31,7 +31,7 @@ import routerReports from './routes/reports.js'
|
|||
import routerWorkOrders from './routes/workOrders.js'
|
||||
import { version } from './version.js'
|
||||
|
||||
const debug = Debug(`${DEBUG_NAMESPACE}:app:${process.pid}`)
|
||||
const debug = Debug(`${DEBUG_NAMESPACE}:app:${process.pid.toString().padEnd(5)}`)
|
||||
|
||||
/*
|
||||
* INITIALIZE APP
|
||||
|
|
@ -107,7 +107,7 @@ app.use(
|
|||
},
|
||||
secret: configFunctions.getConfigProperty('session.secret'),
|
||||
store: new FileStoreSession({
|
||||
logFn: Debug(`${DEBUG_NAMESPACE}:session:${process.pid}`),
|
||||
logFn: Debug(`${DEBUG_NAMESPACE}:session:${process.pid.toString().padEnd(5)}`),
|
||||
path: './data/sessions',
|
||||
retries: 20
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import { app } from '../app.js';
|
|||
import { initializeDatabase } from '../database/initializeDatabase.js';
|
||||
import { DEBUG_NAMESPACE } from '../debug.config.js';
|
||||
import { getConfigProperty } from '../helpers/config.helpers.js';
|
||||
const debug = Debug(`${DEBUG_NAMESPACE}:wwwProcess:${process.pid}`);
|
||||
const debug = Debug(`${DEBUG_NAMESPACE}:wwwProcess:${process.pid.toString().padEnd(5)}`);
|
||||
if (process.send === undefined) {
|
||||
// INITIALIZE THE DATABASE
|
||||
await initializeDatabase();
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import { initializeDatabase } from '../database/initializeDatabase.js'
|
|||
import { DEBUG_NAMESPACE } from '../debug.config.js'
|
||||
import { getConfigProperty } from '../helpers/config.helpers.js'
|
||||
|
||||
const debug = Debug(`${DEBUG_NAMESPACE}:wwwProcess:${process.pid}`)
|
||||
const debug = Debug(`${DEBUG_NAMESPACE}:wwwProcess:${process.pid.toString().padEnd(5)}`)
|
||||
|
||||
if (process.send === undefined) {
|
||||
// INITIALIZE THE DATABASE
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import fs from 'node:fs/promises';
|
|||
import Debug from 'debug';
|
||||
import { DEBUG_NAMESPACE } from '../debug.config.js';
|
||||
import { getConfigProperty } from './config.helpers.js';
|
||||
const debug = Debug(`${DEBUG_NAMESPACE}:database.helpers:${process.pid}`);
|
||||
const debug = Debug(`${DEBUG_NAMESPACE}:database.helpers:${process.pid.toString().padEnd(5)}`);
|
||||
export const useTestDatabases = getConfigProperty('application.useTestDatabases') ||
|
||||
process.env.TEST_DATABASES === 'true';
|
||||
if (useTestDatabases) {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { DEBUG_NAMESPACE } from '../debug.config.js'
|
|||
|
||||
import { getConfigProperty } from './config.helpers.js'
|
||||
|
||||
const debug = Debug(`${DEBUG_NAMESPACE}:database.helpers:${process.pid}`)
|
||||
const debug = Debug(`${DEBUG_NAMESPACE}:database.helpers:${process.pid.toString().padEnd(5)}`)
|
||||
|
||||
export const useTestDatabases =
|
||||
getConfigProperty('application.useTestDatabases') ||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import getWorkOrderMilestoneTypesFromDatabase from '../database/getWorkOrderMile
|
|||
import getWorkOrderTypesFromDatabase from '../database/getWorkOrderTypes.js';
|
||||
import { DEBUG_NAMESPACE } from '../debug.config.js';
|
||||
import { getConfigProperty } from './config.helpers.js';
|
||||
const debug = Debug(`${DEBUG_NAMESPACE}:functions.cache:${process.pid}`);
|
||||
const debug = Debug(`${DEBUG_NAMESPACE}:functions.cache:${process.pid.toString().padEnd(5)}`);
|
||||
/*
|
||||
* Burial Site Statuses
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ import type {
|
|||
|
||||
import { getConfigProperty } from './config.helpers.js'
|
||||
|
||||
const debug = Debug(`${DEBUG_NAMESPACE}:functions.cache:${process.pid}`)
|
||||
const debug = Debug(`${DEBUG_NAMESPACE}:functions.cache:${process.pid.toString().padEnd(5)}`)
|
||||
|
||||
/*
|
||||
* Burial Site Statuses
|
||||
|
|
|
|||
Loading…
Reference in New Issue