Methods
(inner) log(logLevel, message, metadata)
A wrapper around logger.log because we can't export log on it's own meant to be used as borq.log
- Source:
Parameters:
Name | Type | Description |
---|---|---|
logLevel |
string
|
The logLevel like error, warn etc. |
message |
string
|
message of log, this could also just be a JSON object holding the message & metadata |
metadata |
object
|
metadata for the log if the previous argument (message) is an object there's no need for this argment. |
(inner) logRejectedPromise(text)
A function to send rejected promise errors to both winston and sentry
- Source:
Parameters:
Name | Type | Description |
---|---|---|
text |
string
|
the promise rejection error text |
(inner) setupSentry(sentryDSN, environment, loggingLevel) → {object}
Configure Sentry using the env vars pased if in production
- Source:
Parameters:
Name | Type | Description |
---|---|---|
sentryDSN |
string
|
The url given by Sentry tied to your account |
environment |
string
|
dev, testing, peoduction etc. |
loggingLevel |
string
|
error, info, warn etc. |
Returns:
- Type:
-
object
return raven object if in production