@coder/logger
TypeScript icon, indicating that this package has built-in type declarations

3.0.1 • Public • Published

Logger

Beautiful logging inspired by https://github.com/uber-go/zap.

  • Built for node and the browser
  • Zero dependencies
  • Uses groups in the browser to reduce clutter

Example Usage

import { field, logger } from "@coder/logger";

logger.info("Loading container",
	field("container_id", container.id_str),
	field("organization_id", organization.id_str));

Formatting

By default the logger uses a different formatter depending on whether it detects it is running in the browser or not. A custom formatter can be set:

import { logger, Formatter } from "@coder/logger";

class MyFormatter extends Formatter {
	// implementation ...
}

logger.formatter = new MyFormatter();

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
3.0.12,248latest

Version History

VersionDownloads (Last 7 Days)Published
3.0.12,248
3.0.0215
1.1.16475
1.1.150
1.1.140
1.1.130
1.1.122
1.1.114
1.1.100
1.1.90
1.1.80
1.1.70
1.1.60
1.1.51
1.1.40
1.1.30
1.1.20
1.1.10
1.1.00
1.0.31
1.0.20
1.0.10

Package Sidebar

Install

npm i @coder/logger

Weekly Downloads

2,946

Version

3.0.1

License

MIT

Unpacked Size

45 kB

Total Files

15

Last publish

Collaborators

  • kiracoder
  • bruno.quaresma
  • coderhq
  • kylecarbs
  • coderasher
  • nhooyr
  • ammarb