@meadown/logger 1.6.0 → 1.7.0
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.
- package/README.md +1 -13
- package/dist/cjs/index.d.ts +1 -6
- package/dist/cjs/index.js +1 -7
- package/dist/index.d.ts +1 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -100,18 +100,6 @@ logger.maxLines = 0 // back to the default — show everything
|
|
|
100
100
|
It only trims the _message_, never the tag, timestamp, or location, and the setting
|
|
101
101
|
applies to `logger`, `.error`, and `.warn` alike.
|
|
102
102
|
|
|
103
|
-
## Deprecated alias
|
|
104
|
-
|
|
105
|
-
Older examples used `customLog`. That name still works as a named export for now,
|
|
106
|
-
but it is deprecated and new code should use `logger`:
|
|
107
|
-
|
|
108
|
-
```ts
|
|
109
|
-
import logger, { customLog } from "@meadown/logger"
|
|
110
|
-
|
|
111
|
-
logger("new code")
|
|
112
|
-
customLog("old code still works") // deprecated
|
|
113
|
-
```
|
|
114
|
-
|
|
115
103
|
## What about production?
|
|
116
104
|
|
|
117
105
|
Here's the nice part: you don't have to do anything. Logs show up while you're
|
|
@@ -129,7 +117,7 @@ quietly step aside.
|
|
|
129
117
|
## Security
|
|
130
118
|
|
|
131
119
|
It's a tiny, zero-dependency package with no file, network, or dynamic-code access.
|
|
132
|
-
See [SECURITY.md](https://
|
|
120
|
+
See [SECURITY.md](https://www.npmjs.com/package/@meadown/logger?activeTab=code)
|
|
133
121
|
for the security model and how to report a vulnerability. One thing to know: like
|
|
134
122
|
`console.log`, log arguments are written to the terminal as-is and are not
|
|
135
123
|
sanitized — don't log untrusted data to a terminal you trust.
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -20,10 +20,5 @@ export interface LogFN {
|
|
|
20
20
|
* logger.maxLines = 5 // long messages collapse to 5 lines; 0 = show all
|
|
21
21
|
*/
|
|
22
22
|
declare const logger: LogFN;
|
|
23
|
-
|
|
24
|
-
* @deprecated Use {@link logger} instead. This alias remains for compatibility
|
|
25
|
-
* with older examples and will be removed in a future major version.
|
|
26
|
-
*/
|
|
27
|
-
declare const customLog: LogFN;
|
|
28
|
-
export { customLog, logger };
|
|
23
|
+
export { logger };
|
|
29
24
|
export default logger;
|
package/dist/cjs/index.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* All rights reserved
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.logger =
|
|
9
|
+
exports.logger = void 0;
|
|
10
10
|
const index_js_1 = require("./utils/index.js");
|
|
11
11
|
/**
|
|
12
12
|
* Logs to the console, but only outside production. Each line is prefixed with
|
|
@@ -31,10 +31,4 @@ Object.defineProperty(logger, "maxLines", {
|
|
|
31
31
|
enumerable: true,
|
|
32
32
|
configurable: true,
|
|
33
33
|
});
|
|
34
|
-
/**
|
|
35
|
-
* @deprecated Use {@link logger} instead. This alias remains for compatibility
|
|
36
|
-
* with older examples and will be removed in a future major version.
|
|
37
|
-
*/
|
|
38
|
-
const customLog = logger;
|
|
39
|
-
exports.customLog = customLog;
|
|
40
34
|
exports.default = logger;
|
package/dist/index.d.ts
CHANGED
|
@@ -20,11 +20,6 @@ export interface LogFN {
|
|
|
20
20
|
* logger.maxLines = 5 // long messages collapse to 5 lines; 0 = show all
|
|
21
21
|
*/
|
|
22
22
|
declare const logger: LogFN;
|
|
23
|
-
|
|
24
|
-
* @deprecated Use {@link logger} instead. This alias remains for compatibility
|
|
25
|
-
* with older examples and will be removed in a future major version.
|
|
26
|
-
*/
|
|
27
|
-
declare const customLog: LogFN;
|
|
28
|
-
export { customLog, logger };
|
|
23
|
+
export { logger };
|
|
29
24
|
export default logger;
|
|
30
25
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AASA,gFAAgF;AAChF,MAAM,WAAW,KAAK;IACpB,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAA;IAC1B,KAAK,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAA;IAC/B,IAAI,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAA;IAC9B;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED;;;;;;;;;GASG;AACH,QAAA,MAAM,MAAM,EAGN,KAAK,CAAA;AAWX
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AASA,gFAAgF;AAChF,MAAM,WAAW,KAAK;IACpB,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAA;IAC1B,KAAK,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAA;IAC/B,IAAI,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAA;IAC9B;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED;;;;;;;;;GASG;AACH,QAAA,MAAM,MAAM,EAGN,KAAK,CAAA;AAWX,OAAO,EAAE,MAAM,EAAE,CAAA;AACjB,eAAe,MAAM,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -27,11 +27,6 @@ Object.defineProperty(logger, "maxLines", {
|
|
|
27
27
|
enumerable: true,
|
|
28
28
|
configurable: true,
|
|
29
29
|
});
|
|
30
|
-
|
|
31
|
-
* @deprecated Use {@link logger} instead. This alias remains for compatibility
|
|
32
|
-
* with older examples and will be removed in a future major version.
|
|
33
|
-
*/
|
|
34
|
-
const customLog = logger;
|
|
35
|
-
export { customLog, logger };
|
|
30
|
+
export { logger };
|
|
36
31
|
export default logger;
|
|
37
32
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAc9E;;;;;;;;;GASG;AACH,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,QAAQ,CAAC,EAAE;IACvD,KAAK,EAAE,SAAS,CAAC,OAAO,EAAE,SAAS,CAAC;IACpC,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC;CAClC,CAAU,CAAA;AAEX,+EAA+E;AAC/E,uDAAuD;AACvD,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,UAAU,EAAE;IACxC,GAAG,EAAE,eAAe;IACpB,GAAG,EAAE,eAAe;IACpB,UAAU,EAAE,IAAI;IAChB,YAAY,EAAE,IAAI;CACnB,CAAC,CAAA;AAEF
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAc9E;;;;;;;;;GASG;AACH,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,QAAQ,CAAC,EAAE;IACvD,KAAK,EAAE,SAAS,CAAC,OAAO,EAAE,SAAS,CAAC;IACpC,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC;CAClC,CAAU,CAAA;AAEX,+EAA+E;AAC/E,uDAAuD;AACvD,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,UAAU,EAAE;IACxC,GAAG,EAAE,eAAe;IACpB,GAAG,EAAE,eAAe;IACpB,UAAU,EAAE,IAAI;IAChB,YAAY,EAAE,IAAI;CACnB,CAAC,CAAA;AAEF,OAAO,EAAE,MAAM,EAAE,CAAA;AACjB,eAAe,MAAM,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meadown/logger",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "A tiny, zero-dependency logger for Node.js and TypeScript that tags each line, timestamps it, shows the source file and line, and goes quiet in production.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"logger",
|