git.iko.soy/typeable/control-logger
on master help sign in
Merge pull request #2 from typeable/wip/yuras/reopenable

Drop reopenable scribe

commit1fd44dd16f4a21b996ba437b0f5798c03c03d9bb authorYuras <shumovichy@gmail.com> dateWed 6 Apr 2022, 14:33 (5 years ago) parent588cf7c592cccb
3 files changed−22
control-logger.cabal−1 src/Control/Logger/Katip.hs−2 src/Control/Logger/Katip/Scribes/Reopenable.hs−19
control-logger.cabal−1
@@ -11,7 +11,6 @@ library
1111 if !impl(ghcjs)
1212 exposed-modules: Control.Logger
1313 Control.Logger.Katip
14− Control.Logger.Katip.Scribes.Reopenable
1514 Control.Logger.Katip.Utils
1615 Control.Logger.Orphans
1716 exposed-modules: Control.Logger.Internal
src/Control/Logger/Katip.hs−2
@@ -7,14 +7,12 @@ module Control.Logger.Katip
77 , getKatipLogger
88 , ourFormatter
99 , katipIndexNameString
10− , reopenableFileLog
1110 ) where
1211
1312import Control.EnvT
1413import Control.Has.Katip ()
1514import Control.Lens hiding ((.=))
1615import Control.Logger.Internal
17−import Control.Logger.Katip.Scribes.Reopenable
1816import Data.Aeson hiding (Error)
1917import qualified Data.HashMap.Strict as HM
2018import Data.Text (Text)
src/Control/Logger/Katip/Scribes/Reopenable.hsdeleted−19
@@ -1,19 +0,0 @@
1−module Control.Logger.Katip.Scribes.Reopenable where
2−
3−import Katip
4−import Katip.Scribes.Handle.FileOwner
5−
6−-- | Utility function to create scribe using the 'FileOwner'
7−-- inside. Returns new scribe and action to reopen the log
8−-- file. Reopening is performed asyncronously.
9−reopenableFileLog
10− :: FilePath
11− -> (forall a. LogItem a => ItemFormatter a)
12− -> PermitFunc
13− -> Verbosity
14− -> IO (Scribe, IO ())
15−reopenableFileLog fPath formatter permitF verbosity = do
16− owner <- newFileOwner fPath defaultFileOwnerSettings
17− s <- mkFileOwnerScribeWithFormatter formatter (ColorLog False)
18− owner permitF verbosity
19− return (s, fileOwnerControl owner ReopenMsg)