@logtape/logtape 0.2.0 → 0.3.0-dev.24

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 CHANGED
@@ -12,9 +12,36 @@ LogTape
12
12
  > LogTape is still in the early stage of development. The API is not stable
13
13
  > yet. Please be careful when using it in production.
14
14
 
15
- LogTape is a simple logging library with zero dependencies for
16
- Deno/Node.js/Bun/browsers. It is designed to be used for both applications
17
- and libraries.
15
+ LogTape is a logging library for JavaScript and TypeScript. It provides a
16
+ simple and flexible logging system that is easy to use and easy to extend.
17
+ The highlights of LogTape are:
18
+
19
+ - *Zero dependencies*: LogTape has zero dependencies. You can use LogTape
20
+ without worrying about the dependencies of LogTape.
21
+
22
+ - *Library support*: LogTape is designed to be used in libraries as well
23
+ as applications. You can use LogTape in libraries to provide logging
24
+ capabilities to users of the libraries.
25
+
26
+ - *Runtime diversity*: LogTape supports Deno, Node.js, Bun, edge functions,
27
+ and browsers. You can use LogTape in various environments without
28
+ changing the code.
29
+
30
+ - *Structured logging*: LogTape supports structured logging. You can log
31
+ messages with structured data. LogTape provides a simple and flexible
32
+ way to log structured data.
33
+
34
+ - *Hierarchical categories*: LogTape uses a hierarchical category system
35
+ to manage loggers. You can control the verbosity of log messages by
36
+ setting the log level of loggers at different levels of the category
37
+ hierarchy.
38
+
39
+ - *Template literals*: LogTape supports template literals for log messages.
40
+ You can use template literals to log messages with placeholders and
41
+ values.
42
+
43
+ - *Dead simple sinks*: LogTape provides a simple and flexible way to add
44
+ sinks. You can easily add your own sinks to LogTape.
18
45
 
19
46
  Currently, LogTape provides only few sinks, but [you can easily add your own
20
47
  sinks.](#sinks)
@@ -23,7 +50,7 @@ sinks.](#sinks)
23
50
  ![](./screenshots/terminal-console.png)
24
51
 
25
52
  [JSR]: https://jsr.io/@logtape/logtape
26
- [JSR badge]: https://jsr.io/badges/@logtape/logtape?v=0.2.0
53
+ [JSR badge]: https://jsr.io/badges/@logtape/logtape?v=0.2.1
27
54
  [npm]: https://www.npmjs.com/package/@logtape/logtape
28
55
  [npm badge]: https://img.shields.io/npm/v/@logtape/logtape?logo=npm
29
56
  [GitHub Actions]: https://github.com/dahlia/logtape/actions/workflows/main.yaml
@@ -100,7 +127,8 @@ logger.error `This is an error message with ${value}.`;
100
127
  logger.fatal `This is a fatal message with ${value}.`;
101
128
  ~~~~
102
129
 
103
- You can also log messages with a function call:
130
+ You can also log messages with a function call. In this case, log messages
131
+ are structured data:
104
132
 
105
133
  ~~~~ typescript
106
134
  logger.debug("This is a debug message with {value}.", { value });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logtape/logtape",
3
- "version": "0.2.0",
3
+ "version": "0.3.0-dev.24+25e57140",
4
4
  "description": "Simple logging library with zero dependencies for Deno/Node.js/Bun/browsers",
5
5
  "keywords": [
6
6
  "logging",
package/types/mod.d.ts CHANGED
@@ -4,5 +4,5 @@ export { type Filter, type FilterLike, getLevelFilter, toFilter, } from "./filte
4
4
  export { type ConsoleFormatter, defaultConsoleFormatter, defaultTextFormatter, type TextFormatter, } from "./formatter.js";
5
5
  export { getLogger, type Logger } from "./logger.js";
6
6
  export type { LogLevel, LogRecord } from "./record.js";
7
- export { type ConsoleSinkOptions, type FileSinkDriver, type FileSinkOptions, getConsoleSink, getStreamSink, type Sink, type StreamSinkOptions, } from "./sink.js";
7
+ export { type ConsoleSinkOptions, type FileSinkOptions, getConsoleSink, getStreamSink, type RotatingFileSinkOptions, type Sink, type StreamSinkOptions, } from "./sink.js";
8
8
  //# sourceMappingURL=mod.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,MAAM,EACX,WAAW,EACX,SAAS,EACT,OAAO,EACP,KAAK,YAAY,EACjB,KAAK,GACN,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,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