Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yamadapc/haskell-bunyan
`node-bunyan` implementation in Haskell. Needs benchmarking and some caching.
https://github.com/yamadapc/haskell-bunyan
Last synced: 15 days ago
JSON representation
`node-bunyan` implementation in Haskell. Needs benchmarking and some caching.
- Host: GitHub
- URL: https://github.com/yamadapc/haskell-bunyan
- Owner: yamadapc
- License: mit
- Created: 2015-11-01T12:57:55.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-01T20:06:37.000Z (about 9 years ago)
- Last Synced: 2024-12-24T11:57:51.061Z (17 days ago)
- Language: Haskell
- Homepage:
- Size: 137 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
haskell-bunyan
==============
`node-bunyan` implementation in Haskell. Needs benchmarking and some caching.## Usage
```haskell
import System.Log.Bunyanmain :: IO ()
main = do
logger <- newLogger def { loggerName = "app" }
ldebug logger [] "Hello"
linfo logger ["value" .= ("sunny" :: String)] "Hello"
```Will log:
```jsonl
{"hostname":"Pedros-MacBook-Pro.local","time":"2015-11-01T13:11:01.161Z","msg":"Hello","name":"app","pid":48910,"level":20,"v":0}
{"hostname":"Pedros-MacBook-Pro.local","time":"2015-11-01T13:11:01.164Z","value":"sunny","msg":"Hello","name":"app","pid":48910,"level":30,"v":0}
```Which with the `bunyan` command-line utility, will be formated as:
![](https://www.dropbox.com/s/01on6brqm9r5ced/Screenshot%202015-11-01%2014.11.56.png?dl=1)## License
This code is licensed under the MIT license for Pedro Tacla Yamada.