Methods


<async> run( filePath [, param ], open )

Description

Run json-log-viewer with parameter in the same or a new tab

Parameters
Name Type Attributes Description
filePath string

path to log file

param string <optional>

json-log-view parameter

open boolean

if true open json-log-viewer in a new console

Details

<async> createLogFile( filesGlob ) → {string}

Description

Merge multiple files and save it optional

Parameters
Name Type Description
filesGlob string

glob string for log files

Returns

path to merged log file

Details

<async> saveLogFile( src, dist )

Description

Save file to dist path

Parameters
Name Type Description
src string

source file path

dist string

destination file path

Details

<async> backupConfig( backupPath ) → {Promise}

Description

Copy old config to a new path

Parameters
Name Type Description
backupPath string

path where config file will be saved

Returns

Promise for coping a file

Details

<async> resetConfig()

Description

Delete config file

Details

<async> loadConfig( [ pathConfig ] )

Description

Load config from parameter or if parameter is empty loads from actual path

Parameters
Name Type Attributes Description
pathConfig string <optional>

config to .json-log-viewer file

Details

<async> runTransformer( transformer, filePath ) → {Promise.<string>}

Description

Run transformer over a log file

Parameters
Name Type Description
transformer string

string for require the transformer

filePath string

path to log file

Returns

path to merged log file

Details

runTransformerPath( transformer, filePath ) → {Promise}

Description

Return transform promise from path

Parameters
Name Type Description
transformer string

path to transform file

filePath string

path to log file

Returns

Transform promise

Details

<async> runTransformerNpm( transformer, filePath ) → {Promise}

Description

Return transform promise from module name

Parameters
Name Type Description
transformer string

name of transform module

filePath string

path to log file

Returns

Transform promise

Details