git.iko.soy/typeable/control-logger
on master help sign in
Merge pull request #2 from typeable/wip/yuras/reopenable
1fd44ddYuras
control-logger.cabal−1
@@ -11,7 +11,6 @@ library
11 if !impl(ghcjs)
11 if !impl(ghcjs)
12 exposed-modules: Control.Logger
12 exposed-modules: Control.Logger
13 Control.Logger.Katip
13 Control.Logger.Katip
14− Control.Logger.Katip.Scribes.Reopenable
15 Control.Logger.Katip.Utils
14 Control.Logger.Katip.Utils
16 Control.Logger.Orphans
15 Control.Logger.Orphans
17 exposed-modules: Control.Logger.Internal
16 exposed-modules: Control.Logger.Internal
src/Control/Logger/Katip.hs−2
@@ -7,14 +7,12 @@ module Control.Logger.Katip
7 , getKatipLogger
7 , getKatipLogger
8 , ourFormatter
8 , ourFormatter
9 , katipIndexNameString
9 , katipIndexNameString
10− , reopenableFileLog
11 ) where
10 ) where
12
11
13import Control.EnvT
12import Control.EnvT
14import Control.Has.Katip ()
13import Control.Has.Katip ()
15import Control.Lens hiding ((.=))
14import Control.Lens hiding ((.=))
16import Control.Logger.Internal
15import Control.Logger.Internal
17−import Control.Logger.Katip.Scribes.Reopenable
18import Data.Aeson hiding (Error)
16import Data.Aeson hiding (Error)
19import qualified Data.HashMap.Strict as HM
17import qualified Data.HashMap.Strict as HM
20import Data.Text (Text)
18import 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)