debug logging alignment

pull/11/head
Dan Gowans 2025-04-25 11:19:19 -04:00
parent f6eb3bf550
commit e09d1ddb5d
8 changed files with 10 additions and 10 deletions

4
app.js
View File

@ -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
View File

@ -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
}),

View File

@ -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();

View File

@ -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

View File

@ -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) {

View File

@ -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') ||

View File

@ -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
*/

View File

@ -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