haskoin-store 0.18.2 → 0.18.3
raw patch · 4 files changed
+20/−5 lines, 4 files
Files
- CHANGELOG.md +4/−0
- app/Main.hs +4/−0
- haskoin-store.cabal +3/−3
- src/Network/Haskoin/Store/Web.hs +9/−2
CHANGELOG.md view
@@ -4,6 +4,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## 0.18.3+### Changed+- Configurable HTTP request logging. Disabled by default.+ ## 0.18.2 ### Changed - Fix for memory leak.
app/Main.hs view
@@ -53,6 +53,7 @@ , configVersion :: !Bool , configCache :: !FilePath , configDebug :: !Bool+ , configReqLog :: !Bool , configMaxLimits :: !MaxLimits } @@ -104,6 +105,7 @@ value "" configVersion <- switch $ long "version" <> short 'v' <> help "Show version" configDebug <- switch $ long "debug" <> help "Show debug messages"+ configReqLog <- switch $ long "reqlog" <> help "HTTP request logging" maxLimitCount <- option auto $ metavar "INT" <> long "maxlimit" <>@@ -191,6 +193,7 @@ , configDir = db_dir , configDebug = deb , configMaxLimits = limits+ , configReqLog = reqlog } = runStderrLoggingT . filterLogger l . flip finally clear $ do $(logInfoS) "Main" $@@ -247,6 +250,7 @@ , webPublisher = pub , webStore = str , webMaxLimits = limits+ , webReqLog = reqlog } in runWeb wcfg where
haskoin-store.cabal view
@@ -1,13 +1,13 @@ cabal-version: 2.0 --- This file has been generated from package.yaml by hpack version 0.31.1.+-- This file has been generated from package.yaml by hpack version 0.31.2. -- -- see: https://github.com/sol/hpack ----- hash: 7e10641ad38c5c5cdcbe8698e96212227b3a9250f8d2f3ea491700e33652483d+-- hash: cb17d9e2eacd3acbc782ba292f82750cb88b6510b29e5685c11652ab5ebdcee1 name: haskoin-store-version: 0.18.2+version: 0.18.3 synopsis: Storage and index for Bitcoin and Bitcoin Cash description: Store blocks, transactions, and balances for Bitcoin or Bitcoin Cash, and make that information via REST API. category: Bitcoin, Finance, Network
src/Network/Haskoin/Store/Web.hs view
@@ -119,6 +119,7 @@ , webPublisher :: !(Publisher StoreEvent) , webStore :: !Store , webMaxLimits :: !MaxLimits+ , webReqLog :: !Bool } data MaxLimits =@@ -658,11 +659,17 @@ , webStore = st , webPublisher = pub , webMaxLimits = limits+ , webReqLog = reqlog } = do- l <- logIt+ req_logger <-+ if reqlog+ then Just <$> logIt+ else return Nothing runner <- askRunInIO scottyT port (runner . withLayeredDB db) $ do- middleware l+ case req_logger of+ Just m -> middleware m+ Nothing -> return () defaultHandler (defHandler net) S.get "/block/best" $ scottyBestBlock net S.get "/block/:block" $ scottyBlock net