cf-node-client
momo auto_awesome BUY CLAUDE KIT WITH 20% OFF coffee BUY ME COFFEE

Class: Logs

Logs(endPointopt)

Logs — CF log retrieval and parsing. Extends CloudControllerBase for shared HttpUtils / HttpStatus / token management. https://docs.pivotal.io/pivotalcf/devguide/deploy-apps/streaming-logs.html

Constructor

new Logs(endPointopt)

Parameters:
Name Type Attributes Description
endPoint String <optional>
Logging endpoint URL
Source:

Methods

(static) parseLogs(rawLogs) → {Array}

Parse raw CF log output into structured entries.
Parameters:
Name Type Description
rawLogs String Newline-separated log string
Source:
Returns:
Array of { timestamp, timestampRaw, source, sourceId, messageType, message }
Type
Array

getRecent(appGuid) → {Promise.<String>}

Get raw recent logs for an application.
Parameters:
Name Type Description
appGuid String Application GUID
Source:
Returns:
Raw log string
Type
Promise.<String>

getRecentParsed(appGuid) → {Promise.<Array>}

Get recent logs parsed into structured objects.
Parameters:
Name Type Description
appGuid String Application GUID
Source:
Returns:
Array of structured log entries
Type
Promise.<Array>