License | BSD-3-Clause |
---|---|
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
A data type to represent log messages, both for robot logs and the system log.
Synopsis
- data Severity
- data RobotLogSource
- = Said
- | Logged
- | RobotError
- data LogSource
- data LogEntry = LogEntry {
- _leTime :: TickNumber
- _leSource :: LogSource
- _leSeverity :: Severity
- _leName :: Text
- _leText :: Text
- leTime :: Lens' LogEntry TickNumber
- leSource :: Lens' LogEntry LogSource
- leSeverity :: Lens' LogEntry Severity
- leName :: Lens' LogEntry Text
- leText :: Lens' LogEntry Text
Documentation
Severity of the error - critical errors are bugs and should be reported as Issues.
Instances
FromJSON Severity Source # | |
ToJSON Severity Source # | |
Generic Severity Source # | |
Show Severity Source # | |
Eq Severity Source # | |
Ord Severity Source # | |
type Rep Severity Source # | |
Defined in Swarm.Log type Rep Severity = D1 ('MetaData "Severity" "Swarm.Log" "swarm-0.5.0.0-6qXEbhCmuXA4wRndqqhBu" 'False) ((C1 ('MetaCons "Info" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Debug" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Warning" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Error" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Critical" 'PrefixI 'False) (U1 :: Type -> Type)))) |
data RobotLogSource Source #
How a robot log entry was produced.
Said | Produced by |
Logged | Produced by |
RobotError | Produced as the result of an error. |
Instances
Source of a log entry.
RobotLog RobotLogSource Int (Cosmic Location) | Log produced by a robot. Stores information about which command was used and the ID and location of the producing robot. |
SystemLog | Log produced by an exception or system. |
Instances
FromJSON LogSource Source # | |
ToJSON LogSource Source # | |
Generic LogSource Source # | |
Show LogSource Source # | |
Eq LogSource Source # | |
Ord LogSource Source # | |
Defined in Swarm.Log | |
type Rep LogSource Source # | |
Defined in Swarm.Log type Rep LogSource = D1 ('MetaData "LogSource" "Swarm.Log" "swarm-0.5.0.0-6qXEbhCmuXA4wRndqqhBu" 'False) (C1 ('MetaCons "RobotLog" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 RobotLogSource) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Cosmic Location)))) :+: C1 ('MetaCons "SystemLog" 'PrefixI 'False) (U1 :: Type -> Type)) |
A log entry.
LogEntry | |
|
Instances
FromJSON LogEntry Source # | |
ToJSON LogEntry Source # | |
Generic LogEntry Source # | |
Show LogEntry Source # | |
Eq LogEntry Source # | |
Ord LogEntry Source # | |
type Rep LogEntry Source # | |
Defined in Swarm.Log type Rep LogEntry = D1 ('MetaData "LogEntry" "Swarm.Log" "swarm-0.5.0.0-6qXEbhCmuXA4wRndqqhBu" 'False) (C1 ('MetaCons "LogEntry" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_leTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 TickNumber) :*: S1 ('MetaSel ('Just "_leSource") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 LogSource)) :*: (S1 ('MetaSel ('Just "_leSeverity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Severity) :*: (S1 ('MetaSel ('Just "_leName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "_leText") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))) |