Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Documentation
Converts Log
into a list of Node
s 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 particularLevel
. .df1-log .df1-time
- Timestamp - Example:
1999-12-20T07:11:39.230553031Z
.df1-log .df1-path
- Full list of
Path
s - 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.