new Logger(message_obj)
Logger service for the crawler
Parameters:
Name | Type | Description |
---|---|---|
message_obj |
Message |
- Source:
Members
(private, inner) buffer :Array
Logger buffer.
Type:
- Array
- Source:
(private, inner) terminal_buffer :Array
Buffer for terminal output, accessed by web service to get terminal contents.
Type:
- Array
- Source:
Methods
flush(fn)
Flushes buffer contents to log file.
Parameters:
Name | Type | Description |
---|---|---|
fn |
function | callback |
- Source:
getTerminalData() → {Array}
Get terminal data.
- Source:
Returns:
- Type
- Array
isLogging() → {boolean}
check if logging is set.
- Source:
Returns:
- Type
- boolean
isVerbose() → {boolean}
check if verbose is set.
- Source:
Returns:
- Type
- boolean
put(line, color, file_name, caller)
Main method, called by modules to log an event.
Parameters:
Name | Type | Description |
---|---|---|
line |
String | main description |
color |
String | msg type [error, success, info] |
file_name |
String | |
caller |
String | function from which it is called |
- Source:
(private, inner) appendToLog(line)
Writes string to log file.
Parameters:
Name | Type | Description |
---|---|---|
line |
String |
- Source: