df1-html-0.1: Render and parse df1 logs as HTML

Safe HaskellNone
LanguageHaskell2010

Df1.Html.Render

Contents

Synopsis

Documentation

log :: Log -> [Node] Source #

Converts Log into a list of Nodes from Xmlbf to render it as HTML.

Example log: 1999-12-20T07:11:39.230553031Z /foo x=a y=b /bar /qux z=c z=d WARNING Something

The generated HTML matches the following CSS selectors:

.df1-log.df1-debug
.df1-log.df1-info
.df1-log.df1-notice
.df1-log.df1-warning
.df1-log.df1-error
.df1-log.df1-critical
.df1-log.df1-alert
.df1-log.df1-emergency
Top level container for a Log entry of a particular Level.
.df1-log .df1-time
Timestamp - Example: 1999-12-20T07:11:39.230553031Z
.df1-log .df1-path
Full list of Paths - Example: /foo x=a y=b /bar /qux z=c z=d
.df1-log .df1-path .df1-push
Single Push - Examples: /foo, /bar, /qux
.df1-log .df1-path .df1-push .df1-seg
Single Segment - Example: foo
.df1-log .df1-path .df1-attr
Single Attr - Example: x=a, y=b, z=c, z=d
.df1-log .df1-path .df1-attr .df1-key
Single Key - Example: x, y, z, z
.df1-log .df1-path .df1-attr .df1-value
Single Value - Example: a, b, c, d
.df1-log .df1-level
Level - Example: WARNING
.df1-log .df1-msg
Message - Example: Something

Themes

If you need to style the rendered HTML, you can use some of the themes shipped with this library.

theme-solarized-dark.css

To use this theme, wrap the .df1-log elements in a .df1-theme-solarized-dark element.

theme-solarized-light.css

To use this theme, wrap the .df1-log elements in a .df1-theme-solarized-light element.