https://github.com/glennsl/timber
Opinionated logging framework based on @dbuenzli/logs
https://github.com/glennsl/timber
Last synced: 10 days ago
JSON representation
Opinionated logging framework based on @dbuenzli/logs
- Host: GitHub
- URL: https://github.com/glennsl/timber
- Owner: glennsl
- License: mit
- Created: 2020-01-11T23:43:09.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-12-18T23:21:57.000Z (about 4 years ago)
- Last Synced: 2025-01-22T00:36:37.334Z (12 months ago)
- Language: Reason
- Size: 127 KB
- Stars: 19
- Watchers: 2
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-list - timber
README
# timber
Opinionated logging framework based on [@dbuenzli/logs](https://github.com/dbuenzli/logs)

### Features
- Colorized output (except on Windows, because Windows)
- Namespaces, filterable and colorized by hash
- Delta timestamp showing time since previous message
- Console and file reporter out-of-the-box
- TRACE level
- Very simple API
### Example
```reason
Timber.App.enable();
Timber.App.setLevel(Timber.Level.debug);
Timber.App.setLogFile("test.log");
module Log = (val Timber.Log.withNamespace("Timber"));
Log.trace("This won't be logged");
Log.infof(m => m("Formatting and lazy evaluation %i", Random.int(100)));
Log.error("Something went horribly wrong!");
```