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 filePathstring path to log file
paramstring <optional> json-log-view parameter
openboolean 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 filesGlobstring glob string for log files
Returns
Details
-
<async> saveLogFile( src, dist )
-
Description
Save file to dist path
Parameters
Name Type Description srcstring source file path
diststring destination file path
Details
-
<async> backupConfig( backupPath ) → {Promise}
-
Description
Copy old config to a new path
Parameters
Name Type Description backupPathstring path where config file will be saved
Returns
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 pathConfigstring <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 transformerstring string for require the transformer
filePathstring path to log file
Returns
Details
-
runTransformerPath( transformer, filePath ) → {Promise}
-
Description
Return transform promise from path
Parameters
Name Type Description transformerstring path to transform file
filePathstring path to log file
Returns
Details
-
<async> runTransformerNpm( transformer, filePath ) → {Promise}
-
Description
Return transform promise from module name
Parameters
Name Type Description transformerstring name of transform module
filePathstring path to log file
Returns
Details