atlas-cardano-0.4.0: Application backend for Plutus smart contracts on Cardano
Copyright(c) 2023 GYELD GMBH
LicenseApache 2.0
Maintainer[email protected]
Stabilitydevelop
Safe HaskellSafe-Inferred
LanguageGHC2021

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
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

ToJSON GYLogSeverity # 
Instance details

Defined in GeniusYield.Types.Logging

Bounded GYLogSeverity # 
Instance details

Defined in GeniusYield.Types.Logging

Enum 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

Eq GYLogSeverity # 
Instance details

Defined in GeniusYield.Types.Logging

Ord GYLogSeverity # 
Instance details

Defined in GeniusYield.Types.Logging

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"

Instances

Instances details
FromJSON GYLogVerbosity # 
Instance details

Defined in GeniusYield.Types.Logging

ToJSON GYLogVerbosity # 
Instance details

Defined in GeniusYield.Types.Logging

Bounded GYLogVerbosity # 
Instance details

Defined in GeniusYield.Types.Logging

Enum 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

Eq GYLogVerbosity # 
Instance details

Defined in GeniusYield.Types.Logging

Ord GYLogVerbosity # 
Instance details

Defined in GeniusYield.Types.Logging

Namespace

data GYLogNamespace #

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

Instances

Instances details
IsString GYLogNamespace # 
Instance details

Defined in GeniusYield.Types.Logging

Monoid GYLogNamespace # 
Instance details

Defined in GeniusYield.Types.Logging

Semigroup 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

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

Defined in GeniusYield.Types.Logging

Eq GYLogNamespace # 
Instance details

Defined in GeniusYield.Types.Logging

Ord GYLogNamespace # 
Instance details

Defined in GeniusYield.Types.Logging

Scribe Configuration

data GYLogScribeType #

Instances

Instances details
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:[email protected]:8443/sentry/example_project\"}"
Right (GYCustomSourceScribe (LogSrc https://pub:[email protected]: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

ToJSON GYLogScribeType #
>>> LBS8.putStrLn $ Aeson.encode GYStdErrScribe
{"tag":"stderr"}
>>> LBS8.putStrLn $ Aeson.encode $ GYCustomSourceScribe "https://pub:[email protected]:8443/sentry/example_project"
{"tag":"gySource","source":"https://pub:[email protected]:8443/sentry/example_project"}
>>> LBS8.putStrLn $ Aeson.encode $ GYCustomSourceScribe "log.txt"
{"tag":"gySource","source":"log.txt"}
Instance details

Defined in GeniusYield.Types.Logging

Show GYLogScribeType # 
Instance details

Defined in GeniusYield.Types.Logging

Eq GYLogScribeType # 
Instance details

Defined in GeniusYield.Types.Logging

Ord GYLogScribeType # 
Instance details

Defined in GeniusYield.Types.Logging

data GYLogScribeConfig #

Instances

Instances details
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

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

Show GYLogScribeConfig # 
Instance details

Defined in GeniusYield.Types.Logging

Eq GYLogScribeConfig # 
Instance details

Defined in GeniusYield.Types.Logging

Ord GYLogScribeConfig # 
Instance details

Defined in GeniusYield.Types.Logging

newtype LogSrc #

Constructors

LogSrc URI 

Instances

Instances details
FromJSON LogSrc # 
Instance details

Defined in GeniusYield.Types.Logging

ToJSON LogSrc # 
Instance details

Defined in GeniusYield.Types.Logging

IsString LogSrc # 
Instance details

Defined in GeniusYield.Types.Logging

Show LogSrc # 
Instance details

Defined in GeniusYield.Types.Logging

Eq LogSrc # 
Instance details

Defined in GeniusYield.Types.Logging

Methods

(==)LogSrcLogSrcBool Source #

(/=)LogSrcLogSrcBool Source #

Ord LogSrc # 
Instance details

Defined in GeniusYield.Types.Logging

Utilities