@villedemontreal/logger
Version:
Logger and logging utilities
60 lines • 1.7 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.constants = exports.Constants = void 0;
const app_root_path_1 = require("app-root-path");
const path = require("path");
/**
* Library constants
*/
class Constants {
constructor() {
// From the "dist/src/config" folder
this.libRoot = path.normalize(__dirname + '/../..');
this.appRoot = app_root_path_1.path;
}
/**
* Logging constants
*/
get logging() {
return {
/**
* The properties that can be added to a log entry.
*/
properties: {
/**
* The type of log. Those types are specified in
* the following "logType" section.
*/
LOG_TYPE: 'logType',
/**
* The version of the log type.
*/
LOG_TYPE_VERSION: 'logTypeVersion',
/**
* "Nom du composant logiciel"
*/
APP_NAME: 'app',
/**
* "Version du composant logiciel"
*/
APP_VERSION: 'version',
/**
* Correlation id
*/
CORRELATION_ID: 'cid',
},
/**
* The types of logs
*/
logType: {
/**
* The type for our Ville de Montréal logs.
*/
MONTREAL: 'mtl',
},
};
}
}
exports.Constants = Constants;
exports.constants = new Constants();
//# sourceMappingURL=constants.js.map