fix(log_system): bump web version to 1.5.1; fix inspector spacing and parseLoggerDetail edge case
- Bump web/log_system version from 1.5.0 to 1.5.1 to match core/ - Fix console inspector format: add space before suffix %c and trailing empty color intent so suffix text is not merged with the preceding styled message - Add edge case guard in splitModuleName for single-part module strings that differ from LOGGER_NAME, restoring previous behavior of returning the logger name as root and the full value as detail
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
author: Azornes
|
||||
title: AzLogs
|
||||
version: 1.5.0
|
||||
version: 1.5.1
|
||||
description: Logging Configuration
|
||||
*/
|
||||
// Log level for development.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
author: Azornes
|
||||
title: AzLogs
|
||||
version: 1.5.0
|
||||
version: 1.5.1
|
||||
description: Logging Initializator
|
||||
|
||||
Features:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
author: Azornes
|
||||
title: AzLogs
|
||||
version: 1.5.0
|
||||
version: 1.5.1
|
||||
description: Logging Setup - Central logging system
|
||||
|
||||
Features:
|
||||
@@ -197,13 +197,14 @@ class Logger {
|
||||
const message = this.stringifyArgs(args);
|
||||
const suffix = detail ? ` (${detail})` : '';
|
||||
consoleFn(
|
||||
`%c ${levelName.padEnd(LEVEL_WIDTH, ' ')} %c ${timestamp} %c %c ${root} %c %c${message}${suffix}`,
|
||||
`%c ${levelName.padEnd(LEVEL_WIDTH, ' ')} %c ${timestamp} %c %c ${root} %c %c ${message}%c${suffix}`,
|
||||
`background:${color};color:#fff;font-weight:bold;`,
|
||||
`background:${TIME_BG};color:#fff;font-weight:bold;`,
|
||||
`background:${color};color:${color};`,
|
||||
`background:${TIME_BG};color:#fff;font-weight:bold;`,
|
||||
`background:${color};color:${color};`,
|
||||
`color:${color};font-weight:bold;`,
|
||||
'',
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -215,6 +216,12 @@ class Logger {
|
||||
splitModuleName(module) {
|
||||
const value = String(module || LOGGER_NAME);
|
||||
const parts = value.split('.');
|
||||
if (parts.length === 1 && value !== LOGGER_NAME) {
|
||||
return {
|
||||
root: LOGGER_NAME,
|
||||
detail: value
|
||||
};
|
||||
}
|
||||
const root = parts.shift() || LOGGER_NAME;
|
||||
return {
|
||||
root,
|
||||
|
||||
Reference in New Issue
Block a user