Archived
1
0

not finished

This commit is contained in:
Asher
2019-01-07 18:46:19 -06:00
committed by Kyle Carberry
parent 776bb227e6
commit 9cd81f73fa
79 changed files with 11015 additions and 0 deletions

28
packages/logger/README.md Normal file
View File

@ -0,0 +1,28 @@
# Logger
Beautiful client logging inspired by https://github.com/uber-go/zap.
## Example Usage
```javascript
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:
```javascript
import { logger, Formatter } from "@coder/logger";
class MyFormatter extends Formatter {
// implementation ...
}
logger.formatter = new MyFormatter();
```