@tmlmobilidade/logger 20260828.1636.54 → 20260828.1727.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -26,7 +26,10 @@ export function error(args) {
|
|
|
26
26
|
else {
|
|
27
27
|
context = undefined;
|
|
28
28
|
}
|
|
29
|
-
if (args.
|
|
29
|
+
if (args.error instanceof Error) {
|
|
30
|
+
parsedError = args.error;
|
|
31
|
+
}
|
|
32
|
+
else if (args.contextOrErrorOrSpacesAfter instanceof Error) {
|
|
30
33
|
parsedError = args.contextOrErrorOrSpacesAfter;
|
|
31
34
|
}
|
|
32
35
|
else if (args.message instanceof Error) {
|
|
@@ -49,7 +52,8 @@ export function error(args) {
|
|
|
49
52
|
const formattedMessage = formatMessage(args.message, context?.message ?? parsedError?.message ?? '');
|
|
50
53
|
// Only log if not silent
|
|
51
54
|
if (!context?.silentConsole) {
|
|
52
|
-
console.error(`✘ ${formattedMessage}
|
|
55
|
+
console.error(`✘ ${formattedMessage}`);
|
|
56
|
+
console.error(parsedError?.stack ?? new Error().stack);
|
|
53
57
|
}
|
|
54
58
|
if (spacesAfter && spacesAfter > 0) {
|
|
55
59
|
spacer(spacesAfter);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tmlmobilidade/logger",
|
|
3
|
-
"version": "20260828.
|
|
3
|
+
"version": "20260828.1727.14",
|
|
4
4
|
"author": {
|
|
5
5
|
"email": "iso@tmlmobilidade.pt",
|
|
6
6
|
"name": "TML-ISO"
|
|
@@ -42,14 +42,14 @@
|
|
|
42
42
|
"watch": "tsc-watch --onSuccess 'resolve-tspaths'"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@sentry/core": "10.
|
|
46
|
-
"@sentry/nextjs": "10.
|
|
47
|
-
"@sentry/node": "10.
|
|
45
|
+
"@sentry/core": "10.72.0",
|
|
46
|
+
"@sentry/nextjs": "10.72.0",
|
|
47
|
+
"@sentry/node": "10.72.0",
|
|
48
48
|
"@tmlmobilidade/consts": "*"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@tmlmobilidade/go-utils-tsconfig": "*",
|
|
52
|
-
"@types/node": "26.
|
|
52
|
+
"@types/node": "26.4.0",
|
|
53
53
|
"resolve-tspaths": "0.8.23",
|
|
54
54
|
"tsc-watch": "7.2.1",
|
|
55
55
|
"typescript": "6.0.3"
|