| CARVIEW |
Select Language
HTTP/1.1 200 OK
Connection: keep-alive
Server: nginx/1.24.0 (Ubuntu)
Content-Type: text/html; charset=utf-8
Cache-Control: public, max-age=300
Content-Encoding: gzip
Via: 1.1 varnish, 1.1 varnish
Accept-Ranges: bytes
Age: 0
Date: Fri, 16 Jan 2026 01:33:12 GMT
X-Served-By: cache-dfw-kdfw8210074-DFW, cache-bom-vanm7210037-BOM
X-Cache: MISS, MISS
X-Cache-Hits: 0, 0
X-Timer: S1768527192.354941,VS0,VE385
Vary: Accept, Accept-Encoding
transfer-encoding: chunked
log-base: Structured logging solution (base package)
[Skip to Readme]
log-base: Structured logging solution (base package)
A library that provides a way to record structured log messages. Use this package in conjunction with 'log-elasticsearch' or 'log-postgres', depending on which back end you need.
[Skip to Readme]
Modules
[Index] [Quick Jump]
- Log
- Backend
- Log.Class
- Log.Data
- Internal
- Aeson
- Log.Internal.Logger
- Log.Logger
- Log.Monad
Downloads
- log-base-0.12.1.0.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
| Versions [RSS] | 0.7, 0.7.1, 0.7.1.1, 0.7.2.0, 0.7.3.0, 0.7.4.0, 0.8.0.0, 0.8.0.1, 0.9.0.0, 0.9.1.0, 0.9.1.1, 0.10.0.0, 0.10.0.1, 0.11.0.0, 0.11.1.0, 0.12.0.0, 0.12.0.1, 0.12.1.0 |
|---|---|
| Change log | CHANGELOG.md |
| Dependencies | aeson (>=1.0), aeson-pretty (>=0.8.2), base (>=4.13 && <5), bytestring, deepseq, exceptions (>=0.6), mmorph (>=1.0.9 && <1.3), monad-control (>=1.0.3), mtl, semigroups, stm (>=2.4), text, time (>=1.5), transformers-base, unliftio-core (>=0.1.2.0 && <0.3), unordered-containers [details] |
| Tested with | ghc ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.7 || ==9.8.4 || ==9.10.2 || ==9.12.2 |
| License | BSD-3-Clause |
| Copyright | Scrive AB |
| Author | Scrive AB |
| Maintainer | Andrzej Rybczak <andrzej@rybczak.net>, Jonathan Jouty <jonathan@scrive.com>, Mikhail Glushenkov <mikhail@scrive.com>, Oleg Grenrus <oleg.grenrus@iki.fi> |
| Uploaded | by arybczak at 2025-06-26T13:15:57Z |
| Category | System |
| Home page | https://github.com/scrive/log |
| Source repo | head: git clone https://github.com/scrive/log.git |
| Distributions | LTSHaskell:0.12.1.0, NixOS:0.12.1.0, Stackage:0.12.1.0 |
| Reverse Dependencies | 8 direct, 1 indirect [details] |
| Downloads | 10611 total (79 in the last 30 days) |
| Rating | 2.0 (votes: 1) [estimated by Bayesian average] |
| Your Rating |
|
| Status | Docs available [build log] Last success reported on 2025-06-26 [all 1 reports] |
Readme for log-base-0.12.1.0
[back to package description]log
A set of libraries that provide a way to record structured log messages with multiple backends.
Supported backends:
- Standard output via
log-base. - Elasticsearch via
log-elasticsearch. - PostgreSQL via
log-postgres.
Example
A sample usage for logging to both standard output and Elasticsearch:
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Log
import Log.Backend.ElasticSearch
import Log.Backend.StandardOutput
main :: IO ()
main = do
let config = defaultElasticSearchConfig
{ esServer = "https://localhost:9200"
, esIndex = "logs"
}
withStdOutLogger $ \stdoutLogger -> do
withElasticSearchLogger config $ \esLogger -> do
runLogT "main" (stdoutLogger <> esLogger) defaultLogLevel $ do
logInfo_ "Hi there"