Documentation
¶
Overview ¶
Package logging sets up logging for gomel.
It also contains decoders for translating logfile into human readable form.
Index ¶
Constants ¶
const ( // Frequent events UnitCreated = "A" CreatorNotReady = "B" CreatorProcessingUnit = "C" SendingUnitToCreator = "D" AddPreunits = "E" PreunitReady = "F" UnitAdded = "G" ReadyToAdd = "H" DuplicatedUnits = "I" DuplicatedPreunits = "J" UnknownParents = "K" NewTimingUnit = "L" OwnUnitOrdered = "M" LinearOrderExtended = "N" UnitOrdered = "O" SentUnit = "P" PreunitReceived = "Q" SyncStarted = "R" SyncCompleted = "S" GetInfo = "T" SendInfo = "U" GetUnits = "V" SendUnits = "W" PreblockProduced = "Y" // Rare events NewEpoch = "a" EpochEnd = "b" SkippingEpoch = "c" ServiceStarted = "d" ServiceStopped = "e" GotWTK = "f" CreatorFinished = "g" ForkDetected = "h" MissingRandomBytes = "i" InvalidControlHash = "j" InvalidEpochProof = "k" InvalidCreator = "l" FreezedParent = "m" FutureLastTiming = "n" UnableToRetrieveEpoch = "o" RequestOverload = "p" )
Shortcuts for event types. Any event that happens multiple times should have a single character representation.
const ( Sent = "A" Recv = "B" Creator = "C" ID = "D" Epoch = "E" ControlHash = "F" Height = "H" ISID = "I" WTKThreshold = "K" LogLevel = "L" Message = "M" Size = "N" OSID = "O" PID = "P" Level = "Q" Round = "R" Service = "S" Time = "T" )
Field names.
const ( CreatorService int = iota OrderService AdderService ExtenderService GossipService FetchService MCService RMCService AlertService NetworkService )
Service types.
const Genesis = "genesis"
Genesis was better with Phil Collins.
Variables ¶
This section is empty.
Functions ¶
func AddingErrors ¶
AddingErrors logs information about errors from AddPreunits to provided logger. size argument is needed to know how many preunits were added in case everything went fine and errors is nil.
func NewDecoder ¶
NewDecoder creates a decoder that writes to the given writer. Decoder implements io.Writer that takes []bytes with a single log event in JSON and writes it in human readable form.
Types ¶
This section is empty.