atlas-0.1.0.0: Application backend for Plutus smart contracts on Cardano
Copyright(c) 2023 GYELD GMBH
LicenseApache 2.0
Maintainersupport@geniusyield.co
Stabilitydevelop
Safe HaskellNone
LanguageHaskell2010

GeniusYield.Types.Logging

Description

 
Synopsis

Severity

data GYLogSeverity #

>>> LBS8.putStrLn $ Aeson.encode GYDebug
"Debug"
>>> LBS8.putStrLn $ Aeson.encode GYInfo
"Info"
>>> LBS8.putStrLn $ Aeson.encode GYWarning
"Warning"
>>> LBS8.putStrLn $ Aeson.encode GYError
"Error"

Constructors

GYDebug 
GYInfo 
GYWarning 
GYError 

Instances

Instances details
Bounded GYLogSeverity # 
Instance details

Defined in GeniusYield.Types.Logging

Enum GYLogSeverity # 
Instance details

Defined in GeniusYield.Types.Logging

Eq GYLogSeverity # 
Instance details

Defined in GeniusYield.Types.Logging

Ord GYLogSeverity # 
Instance details

Defined in GeniusYield.Types.Logging

Read GYLogSeverity # 
Instance details

Defined in GeniusYield.Types.Logging

Show GYLogSeverity # 
Instance details

Defined in GeniusYield.Types.Logging

FromJSON GYLogSeverity #
>>> Aeson.eitherDecode @GYLogSeverity "\"Debug\""
Right GYDebug
>>> Aeson.eitherDecode @GYLogSeverity "\"Info\""
Right GYInfo
>>> Aeson.eitherDecode @GYLogSeverity "\"Warning\""
Right GYWarning
>>> Aeson.eitherDecode @GYLogSeverity "\"Error\""
Right GYError
>>> Aeson.eitherDecode @GYLogSeverity "\"Fatal\""
Left "Error in $: unknown GYLogSeverity: Fatal"
Instance details

Defined in GeniusYield.Types.Logging

Methods

parseJSON ∷ Value → Parser GYLogSeverity #

parseJSONList ∷ Value → Parser [GYLogSeverity] #

ToJSON GYLogSeverity # 
Instance details

Defined in GeniusYield.Types.Logging

Methods

toJSONGYLogSeverity → Value #

toEncodingGYLogSeverity → Encoding #

toJSONList ∷ [GYLogSeverity] → Value #

toEncodingList ∷ [GYLogSeverity] → Encoding #

Verbosity

newtype GYLogVerbosity #

>>> Aeson.eitherDecode @GYLogVerbosity "\"V0\""
Right (GYLogVerbosity V0)
>>> Aeson.eitherDecode @GYLogVerbosity "\"V1\""
Right (GYLogVerbosity V1)
>>> Aeson.eitherDecode @GYLogVerbosity "\"V2\""
Right (GYLogVerbosity V2)
>>> Aeson.eitherDecode @GYLogVerbosity "\"V3\""
Right (GYLogVerbosity V3)
>>> Aeson.eitherDecode @GYLogVerbosity "\"V4\""
Left "Error in $: Invalid Verbosity V4"

Constructors

GYLogVerbosity Verbosity 

Instances

Instances details
Bounded GYLogVerbosity # 
Instance details

Defined in GeniusYield.Types.Logging

Enum GYLogVerbosity # 
Instance details

Defined in GeniusYield.Types.Logging

Eq GYLogVerbosity # 
Instance details

Defined in GeniusYield.Types.Logging

Ord GYLogVerbosity # 
Instance details

Defined in GeniusYield.Types.Logging

Read GYLogVerbosity # 
Instance details

Defined in GeniusYield.Types.Logging

Show GYLogVerbosity # 
Instance details

Defined in GeniusYield.Types.Logging

FromJSON GYLogVerbosity # 
Instance details

Defined in GeniusYield.Types.Logging

Methods

parseJSON ∷ Value → Parser GYLogVerbosity #

parseJSONList ∷ Value → Parser [GYLogVerbosity] #

ToJSON GYLogVerbosity # 
Instance details

Defined in GeniusYield.Types.Logging

Methods

toJSONGYLogVerbosity → Value #

toEncodingGYLogVerbosity → Encoding #

toJSONList ∷ [GYLogVerbosity] → Value #

toEncodingList ∷ [GYLogVerbosity] → Encoding #

Namespace

data GYLogNamespace #

>>> "My" <> "Namespace" :: GYLogNamespace
GYLogNamespace (Namespace {unNamespace = ["My","Namespace"]})

Instances

Instances details
Eq GYLogNamespace # 
Instance details

Defined in GeniusYield.Types.Logging

Ord GYLogNamespace # 
Instance details

Defined in GeniusYield.Types.Logging

Read GYLogNamespace # 
Instance details

Defined in GeniusYield.Types.Logging

Show GYLogNamespace # 
Instance details

Defined in GeniusYield.Types.Logging

IsString GYLogNamespace # 
Instance details

Defined in GeniusYield.Types.Logging

Semigroup GYLogNamespace # 
Instance details

Defined in GeniusYield.Types.Logging

Monoid GYLogNamespace # 
Instance details

Defined in GeniusYield.Types.Logging

PrintfArg GYLogNamespace #
>>> printf "%s" ("My" <> "Namespace" :: GYLogNamespace)
My.Namespace
Instance details

Defined in GeniusYield.Types.Logging

Scribe Configuration

data GYLogScribeType #

Instances

Instances details
Eq GYLogScribeType # 
Instance details

Defined in GeniusYield.Types.Logging

Ord GYLogScribeType # 
Instance details

Defined in GeniusYield.Types.Logging

Show GYLogScribeType # 
Instance details

Defined in GeniusYield.Types.Logging

FromJSON GYLogScribeType #
>>> Aeson.eitherDecode @GYLogScribeType "{\"tag\":\"stderr\"}"
Right GYStdErrScribe
>>> Aeson.eitherDecode @GYLogScribeType "{\"tag\":\"gySource\",\"source\":\"log.txt\"}"
Right (GYCustomSourceScribe (LogSrc log.txt))
>>> Aeson.eitherDecode @GYLogScribeType "{\"tag\":\"gySource\",\"source\":\"https://pub:priv@sentry.hostname.tld:8443/sentry/example_project\"}"
Right (GYCustomSourceScribe (LogSrc https://pub:...@sentry.hostname.tld:8443/sentry/example_project))
>>> Aeson.eitherDecode @GYLogScribeType "{\"tag\":\"fancy-scribe\"}"
Left "Error in $: unknown GYLogScribe tag: fancy-scribe"
Instance details

Defined in GeniusYield.Types.Logging

Methods

parseJSON ∷ Value → Parser GYLogScribeType #

parseJSONList ∷ Value → Parser [GYLogScribeType] #

ToJSON GYLogScribeType #
>>> LBS8.putStrLn $ Aeson.encode GYStdErrScribe
{"tag":"stderr"}
>>> LBS8.putStrLn $ Aeson.encode $ GYCustomSourceScribe "https://pub:priv@sentry.hostname.tld:8443/sentry/example_project"
{"tag":"gySource","source":"https://pub:...@sentry.hostname.tld:8443/sentry/example_project"}
>>> LBS8.putStrLn $ Aeson.encode $ GYCustomSourceScribe "log.txt"
{"tag":"gySource","source":"log.txt"}
Instance details

Defined in GeniusYield.Types.Logging

Methods

toJSONGYLogScribeType → Value #

toEncodingGYLogScribeType → Encoding #

toJSONList ∷ [GYLogScribeType] → Value #

toEncodingList ∷ [GYLogScribeType] → Encoding #

data GYLogScribeConfig #

Instances

Instances details
Eq GYLogScribeConfig # 
Instance details

Defined in GeniusYield.Types.Logging

Ord GYLogScribeConfig # 
Instance details

Defined in GeniusYield.Types.Logging

Show GYLogScribeConfig # 
Instance details

Defined in GeniusYield.Types.Logging

FromJSON GYLogScribeConfig #
>>> Aeson.decode @GYLogScribeConfig "{\"severity\":\"Warning\",\"verbosity\":\"V1\",\"type\":{\"tag\":\"gySource\",\"source\":\"log.txt\"}}"
Just (GYLogScribeConfig {cfgLogType = GYCustomSourceScribe (LogSrc log.txt), cfgLogSeverity = GYWarning, cfgLogVerbosity = GYLogVerbosity V1})
Instance details

Defined in GeniusYield.Types.Logging

Methods

parseJSON ∷ Value → Parser GYLogScribeConfig #

parseJSONList ∷ Value → Parser [GYLogScribeConfig] #

ToJSON GYLogScribeConfig #
>>> LBS8.putStrLn $ Aeson.encode $ GYLogScribeConfig (GYCustomSourceScribe "log.txt") GYWarning (read "GYLogVerbosity V1")
{"type":{"tag":"gySource","source":"log.txt"},"severity":"Warning","verbosity":"V1"}
Instance details

Defined in GeniusYield.Types.Logging

Methods

toJSONGYLogScribeConfig → Value #

toEncodingGYLogScribeConfig → Encoding #

toJSONList ∷ [GYLogScribeConfig] → Value #

toEncodingList ∷ [GYLogScribeConfig] → Encoding #

newtype LogSrc #

Constructors

LogSrc URI 

Instances

Instances details
Eq LogSrc # 
Instance details

Defined in GeniusYield.Types.Logging

Methods

(==)LogSrcLogSrcBool #

(/=)LogSrcLogSrcBool #

Ord LogSrc # 
Instance details

Defined in GeniusYield.Types.Logging

Methods

compareLogSrcLogSrcOrdering #

(<)LogSrcLogSrcBool #

(<=)LogSrcLogSrcBool #

(>)LogSrcLogSrcBool #

(>=)LogSrcLogSrcBool #

maxLogSrcLogSrcLogSrc #

minLogSrcLogSrcLogSrc #

Show LogSrc # 
Instance details

Defined in GeniusYield.Types.Logging

Methods

showsPrecIntLogSrcShowS #

showLogSrcString #

showList ∷ [LogSrc] → ShowS #

IsString LogSrc # 
Instance details

Defined in GeniusYield.Types.Logging

Methods

fromStringStringLogSrc #

FromJSON LogSrc # 
Instance details

Defined in GeniusYield.Types.Logging

Methods

parseJSON ∷ Value → Parser LogSrc #

parseJSONList ∷ Value → Parser [LogSrc] #

ToJSON LogSrc # 
Instance details

Defined in GeniusYield.Types.Logging

Methods

toJSONLogSrc → Value #

toEncodingLogSrc → Encoding #

toJSONList ∷ [LogSrc] → Value #

toEncodingList ∷ [LogSrc] → Encoding #

Utilities