Safe Haskell | None |
---|---|
Language | GHC2021 |
Synopsis
- data FileLogInitP (p :: ConfigPhase) = MkFileLogInitP {
- path :: FileLogPathF p
- mode :: ConfigPhaseF p FileMode
- sizeMode :: ConfigPhaseF p FileSizeMode
- data FileLogOpened = MkFileLogOpened {}
- data FileLoggingP (p :: ConfigPhase) = MkFileLoggingP {
- file :: FileLogFileF p
- commandNameTrunc :: ConfigPhaseMaybeF p (Truncation 'TruncCommandName)
- deleteOnSuccess :: SwitchF p DeleteOnSuccessSwitch
- lineTrunc :: LineTruncF p
- stripControl :: ConfigPhaseF p FileLogStripControl
- type FileLoggingArgs = FileLoggingP 'ConfigPhaseArgs
- type FileLoggingToml = FileLoggingP 'ConfigPhaseToml
- type FileLoggingMerged = FileLoggingP 'ConfigPhaseMerged
- type FileLoggingEnv = FileLoggingP 'ConfigPhaseEnv
- data DeleteOnSuccessSwitch
- mergeFileLogging :: (HasCallStack, MonadTerminal m) => FileLoggingArgs -> Maybe FileLoggingToml -> m (Maybe FileLoggingMerged)
- withFileLoggingEnv :: (HasCallStack, MonadFileWriter m, MonadHandleWriter m, MonadPathReader m, MonadPathWriter m, MonadSTM m, MonadTerminal m) => Maybe FileLoggingMerged -> (Maybe FileLoggingEnv -> m a) -> m a
Documentation
data FileLogInitP (p :: ConfigPhase) Source #
Initial file log params, for usage before we create the final Env.
MkFileLogInitP | |
|
Instances
(k ~ A_Lens, a ~ ConfigPhaseF p FileMode, b ~ ConfigPhaseF p FileMode) => LabelOptic "mode" k (FileLogInitP p) (FileLogInitP p) a b Source # | |
Defined in Shrun.Configuration.Data.FileLogging labelOptic :: Optic k NoIx (FileLogInitP p) (FileLogInitP p) a b Source # | |
(k ~ A_Lens, a ~ FileLogPathF p, b ~ FileLogPathF p) => LabelOptic "path" k (FileLogInitP p) (FileLogInitP p) a b Source # | |
Defined in Shrun.Configuration.Data.FileLogging labelOptic :: Optic k NoIx (FileLogInitP p) (FileLogInitP p) a b Source # | |
(k ~ A_Lens, a ~ ConfigPhaseF p FileSizeMode, b ~ ConfigPhaseF p FileSizeMode) => LabelOptic "sizeMode" k (FileLogInitP p) (FileLogInitP p) a b Source # | |
Defined in Shrun.Configuration.Data.FileLogging labelOptic :: Optic k NoIx (FileLogInitP p) (FileLogInitP p) a b Source # |
data FileLogOpened Source #
Params after we have opened the file for logging.
Instances
(k ~ A_Lens, a ~ Handle, b ~ Handle) => LabelOptic "handle" k FileLogOpened FileLogOpened a b Source # | |
Defined in Shrun.Configuration.Data.FileLogging labelOptic :: Optic k NoIx FileLogOpened FileLogOpened a b Source # | |
(k ~ A_Lens, a ~ TBQueue FileLog, b ~ TBQueue FileLog) => LabelOptic "queue" k FileLogOpened FileLogOpened a b Source # | |
Defined in Shrun.Configuration.Data.FileLogging labelOptic :: Optic k NoIx FileLogOpened FileLogOpened a b Source # |
data FileLoggingP (p :: ConfigPhase) Source #
Holds file logging config.
MkFileLoggingP | |
|
Instances
type FileLoggingEnv = FileLoggingP 'ConfigPhaseEnv Source #
data DeleteOnSuccessSwitch Source #
Switch for deleting the log file upon success.
Instances
Show DeleteOnSuccessSwitch Source # | |
Defined in Shrun.Configuration.Data.FileLogging showsPrec :: Int -> DeleteOnSuccessSwitch -> ShowS # show :: DeleteOnSuccessSwitch -> String # showList :: [DeleteOnSuccessSwitch] -> ShowS # | |
Eq DeleteOnSuccessSwitch Source # | |
Defined in Shrun.Configuration.Data.FileLogging (==) :: DeleteOnSuccessSwitch -> DeleteOnSuccessSwitch -> Bool # (/=) :: DeleteOnSuccessSwitch -> DeleteOnSuccessSwitch -> Bool # | |
Default DeleteOnSuccessSwitch Source # | |
Defined in Shrun.Configuration.Data.FileLogging | |
(k ~ An_Iso, a ~ Bool, b ~ Bool) => LabelOptic "boolIso" k DeleteOnSuccessSwitch DeleteOnSuccessSwitch a b Source # | |
Defined in Shrun.Configuration.Data.FileLogging |
mergeFileLogging :: (HasCallStack, MonadTerminal m) => FileLoggingArgs -> Maybe FileLoggingToml -> m (Maybe FileLoggingMerged) Source #
Merges args and toml configs.
withFileLoggingEnv :: (HasCallStack, MonadFileWriter m, MonadHandleWriter m, MonadPathReader m, MonadPathWriter m, MonadSTM m, MonadTerminal m) => Maybe FileLoggingMerged -> (Maybe FileLoggingEnv -> m a) -> m a Source #
Given merged FileLogging config, constructs a FileLoggingEnv and calls the continuation.