Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype FormattedTime = FormattedTime {
- _unFormattedTime :: Text
- class (Eq (EngineLogType impl), Hashable (EngineLogType impl)) => EnabledLogTypes impl where
- parseEnabledLogTypes :: String -> Either String [EngineLogType impl]
- defaultEnabledLogTypes :: HashSet (EngineLogType impl)
- isLogTypeEnabled :: HashSet (EngineLogType impl) -> EngineLogType impl -> Bool
- data family EngineLogType impl
- data Hasura
- data InternalLogTypes
- defaultEnabledEngineLogTypes :: HashSet (EngineLogType Hasura)
- isEngineLogTypeEnabled :: HashSet (EngineLogType Hasura) -> EngineLogType Hasura -> Bool
- readLogTypes :: String -> Either String [EngineLogType Hasura]
- userAllowedLogTypes :: [EngineLogType Hasura]
- data LogLevel
- = LevelDebug
- | LevelInfo
- | LevelWarn
- | LevelError
- | LevelOther Text
- data EngineLog impl = EngineLog {
- _elTimestamp :: !FormattedTime
- _elLevel :: !LogLevel
- _elType :: !(EngineLogType impl)
- _elDetail :: !Value
- class EnabledLogTypes impl => ToEngineLog a impl where
- toEngineLog :: a -> (LogLevel, EngineLogType impl, Value)
- data UnstructuredLog = UnstructuredLog {}
- debugT :: Text -> UnstructuredLog
- debugBS :: ByteString -> UnstructuredLog
- debugLBS :: ByteString -> UnstructuredLog
- data LoggerCtx impl = LoggerCtx {
- _lcLoggerSet :: !LoggerSet
- _lcLogLevel :: !LogLevel
- _lcTimeGetter :: !(IO FormattedTime)
- _lcEnabledLogTypes :: !(HashSet (EngineLogType impl))
- data LoggerSettings = LoggerSettings {
- _lsCachedTimestamp :: !Bool
- _lsTimeZone :: !(Maybe TimeZone)
- _lsLevel :: !LogLevel
- defaultLoggerSettings :: Bool -> LogLevel -> LoggerSettings
- getFormattedTime :: Maybe TimeZone -> IO FormattedTime
- mkLoggerCtx :: (MonadIO io, MonadBaseControl IO io) => LoggerSettings -> HashSet (EngineLogType impl) -> ManagedT io (LoggerCtx impl)
- cleanLoggerCtx :: LoggerCtx a -> IO ()
- newtype Logger impl = Logger {
- unLogger :: forall a m. (ToEngineLog a impl, MonadIO m) => a -> m ()
- mkLogger :: ToJSON (EngineLogType impl) => LoggerCtx impl -> Logger impl
- nullLogger :: Logger Hasura
- eventTriggerLogType :: EngineLogType Hasura
- scheduledTriggerLogType :: EngineLogType Hasura
- sourceCatalogMigrationLogType :: EngineLogType Hasura
Documentation
newtype FormattedTime Source #
FormattedTime | |
|
class (Eq (EngineLogType impl), Hashable (EngineLogType impl)) => EnabledLogTypes impl where Source #
Typeclass representing any type which can be parsed into a list of enabled log types, and has a Set
of default enabled log types, and can find out if a log type is enabled
parseEnabledLogTypes :: String -> Either String [EngineLogType impl] Source #
defaultEnabledLogTypes :: HashSet (EngineLogType impl) Source #
isLogTypeEnabled :: HashSet (EngineLogType impl) -> EngineLogType impl -> Bool Source #
Instances
EnabledLogTypes Hasura Source # | |
Defined in Hasura.Logging parseEnabledLogTypes :: String -> Either String [EngineLogType Hasura] Source # defaultEnabledLogTypes :: HashSet (EngineLogType Hasura) Source # isLogTypeEnabled :: HashSet (EngineLogType Hasura) -> EngineLogType Hasura -> Bool Source # |
data family EngineLogType impl Source #
A family of EngineLogType types
Instances
Instances
data InternalLogTypes Source #
ILTUnstructured | mostly for debug logs - see |
ILTEventTrigger | |
ILTScheduledTrigger | |
ILTWsServer | internal logs for the websocket server |
ILTPgClient | |
ILTMetadata | log type for logging metadata related actions; currently used in logging inconsistent metadata |
ILTJwkRefreshLog | |
ILTTelemetry | |
ILTSchemaSyncThread | |
ILTSourceCatalogMigration |
Instances
defaultEnabledEngineLogTypes :: HashSet (EngineLogType Hasura) Source #
isEngineLogTypeEnabled :: HashSet (EngineLogType Hasura) -> EngineLogType Hasura -> Bool Source #
readLogTypes :: String -> Either String [EngineLogType Hasura] Source #
EngineLog | |
|
Instances
Eq (EngineLogType impl) => Eq (EngineLog impl) Source # | |
Show (EngineLogType impl) => Show (EngineLog impl) Source # | |
ToJSON (EngineLogType impl) => ToJSON (EngineLog impl) Source # | |
Defined in Hasura.Logging toJSON :: EngineLog impl -> Value toEncoding :: EngineLog impl -> Encoding toJSONList :: [EngineLog impl] -> Value toEncodingList :: [EngineLog impl] -> Encoding |
class EnabledLogTypes impl => ToEngineLog a impl where Source #
Typeclass representing any data type that can be converted to EngineLog
for the purpose of
logging
toEngineLog :: a -> (LogLevel, EngineLogType impl, Value) Source #
Instances
data UnstructuredLog Source #
Instances
Show UnstructuredLog Source # | |
Defined in Hasura.Logging showsPrec :: Int -> UnstructuredLog -> ShowS # show :: UnstructuredLog -> String # showList :: [UnstructuredLog] -> ShowS # | |
ToEngineLog UnstructuredLog Hasura Source # | |
Defined in Hasura.Logging toEngineLog :: UnstructuredLog -> (LogLevel, EngineLogType Hasura, Value) Source # |
debugT :: Text -> UnstructuredLog Source #
debugBS :: ByteString -> UnstructuredLog Source #
debugLBS :: ByteString -> UnstructuredLog Source #
LoggerCtx | |
|
data LoggerSettings Source #
LoggerSettings | |
|
Instances
Eq LoggerSettings Source # | |
Defined in Hasura.Logging (==) :: LoggerSettings -> LoggerSettings -> Bool # (/=) :: LoggerSettings -> LoggerSettings -> Bool # | |
Show LoggerSettings Source # | |
Defined in Hasura.Logging showsPrec :: Int -> LoggerSettings -> ShowS # show :: LoggerSettings -> String # showList :: [LoggerSettings] -> ShowS # |
defaultLoggerSettings :: Bool -> LogLevel -> LoggerSettings Source #
mkLoggerCtx :: (MonadIO io, MonadBaseControl IO io) => LoggerSettings -> HashSet (EngineLogType impl) -> ManagedT io (LoggerCtx impl) Source #
cleanLoggerCtx :: LoggerCtx a -> IO () Source #
Logger | |
|