Constructor
new Parser(options)
Parameters:
Name | Type | Description |
---|---|---|
options |
Object | Parser options |
Extends
Members
(readonly) autoParse :Boolean
Current `options.autoParse` value
Type:
- Boolean
autoParse
Set current `options.autoParse` value
lastError :Error
The last generated error by this or it's children
Type:
- Error
lastWarning :String
The last generated warning by this or it's children
Type:
- String
logData :String
File data for the current log being parsed, cleared after processing
Type:
- String
(readonly) logPath :String
Current `options.logPath` value
Type:
- String
logPath
Set current `options.logPath` value and start processing if required
logStruct :Object
XML structure generated by XmlParser, cleared after processing
Type:
- Object
(readonly) newestScan :Scan
Pull latest scan from the array of processed log files
Type:
options :Object
Merge default options with given options
Type:
- Object
(readonly) scanCount :Scan
How many scans are currently in memory
Type:
scans :Array
An array of previous parsed log files, cleared if `retainParsedLogs` is false
Type:
- Array
Methods
clearLogs()
Clear log cache
(async) startParse()
Begins processing the log file specified at `options.logPath`
Return will be false if an error occured
Returns:
throwDebug(debugText)
Emits a debug message to any listeners, calls the `onDebug` function if set
Parameters:
Name | Type | Description |
---|---|---|
debugText |
String | Debug message text value |
- Overrides:
- Source:
throwError(errText) → {Boolean}
Emits an error to any listeners, calls the `onError` function if set
Parameters:
Name | Type | Description |
---|---|---|
errText |
String | Error message text value |
- Overrides:
- Source:
Returns:
- Type
- Boolean
throwWarning(warnText)
Emits a warning to any listeners, calls the `onWarning` function if set
Parameters:
Name | Type | Description |
---|---|---|
warnText |
String | Warning message text value |
- Overrides:
- Source: