hnormalise-0.3.2.0: Log message normalisation tool producing structured JSON messages

Safe HaskellNone
LanguageHaskell2010

HNormalise

Synopsis

Documentation

normaliseRsyslog Source #

Arguments

:: Rsyslog

Incoming rsyslog information

-> Maybe ByteString

IF the conversion succeeded the JSON encoded rsyslog message to forward

The normaliseRsyslog function returns an NRSyslog structure tranformed to a ByteString or Nothing when parsing fails

normaliseJsonInput Source #

Arguments

:: ByteString

Input representing an rsyslog message in JSON format

-> Normalised

Transformed or Original result

The normaliseJsonInput function converts a ByteString to a normalised message or keeps the original if the conversion (parsing) fails.

normaliseText Source #

Arguments

:: Text

Input

-> Normalised

Transformed or Original result

The normaliseText function converts a Text to a normalised message or keeps the original (in ByteString) format if the conversion fails

parseMessage :: Parser (Text, ParseResult) Source #

The parseMessage function will try and use each configured parser to normalise the input it's given

data Normalised Source #

Constructors

Transformed !ByteString

A Transformed message contains the JSON normalised representation as a ByteString

Original !ByteString

An Original messge contains the unaltered incoming message as a ByteString