@livy/html-oneline-formatter
v1.0.4
Published
Formats Livy log records as single-line HTML
Downloads
2
Maintainers
Readme
@livy/html-oneline-formatter
This Livy formatter formats log records as single-line HTML.
Basic Example
const { FileHandler } = require('@livy/file-handler')
const { HtmlOnelineFormatter } = require('@livy/html-oneline-formatter')
const handler = new FileHandler('logs.html', {
formatter: new HtmlOnelineFormatter()
})
Installation
Install it via npm:
npm install @livy/html-oneline-formatter
Options
An object of options can be passed to this formatter's constructor.
The following options are available:
include
Type: Partial<IncludedRecordProperties>
Default: {}
Description: Which log record properties to include in the output. The passed object is merged into the following default:
{
datetime: true,
channel: false,
level: true,
severity: false,
message: true,
context: true,
extra: true
}
theme
Type: HtmlFormatterThemeInterface
Default: {}
Description: The color theme to use. A couple of included themes can be found in the themes folder.
wrap
Type: HtmlFormatterThemeInterface
Default: false
Description: Whether to allow lines to wrap when they're too long for the display.
Public API
include
Which log record properties to include in the output. Initially set through the include
option.
theme
The color theme to use. Initially set through the theme
option.
wrap
Whether to allow lines to wrap when they're too long for the display. Initially set through the wrap
option.