Skip to main content

Send All On Type


You might not want logPool for all of your logs. You can use sendAllOnType to send all of your logs on a specific type.

If there is an error on your application, you don't want to wait for the next logPool to send it.

Logs start with AUTO: prefix are automatically catched by Nexys and should be inside sendAllOnType configuration.

OptionTypeDefault
sendAllOnTypestring string[] false["AUTO:ERROR", "AUTO:UNHANDLEDREJECTION", "ERROR"]

Example

// This code will send all logs on logPool to our servers when an error occurs.
const nexys = new Nexys("API_KEY", {
appName: "APP_NAME",
sendAllOnType: ["ERROR", "FATAL", "PURCHASE_ERROR"]
});

Want only one type to be sent immediately?:

// This code will send all logs on logPool matched with "ERROR" type.
const nexys = new Nexys("API_KEY", {
appName: "APP_NAME",
sendAllOnType: "ERROR"
});

Want to disable sendAllOnType?:

// This code will disable sendAllOnType feature.
const nexys = new Nexys("API_KEY", {
appName: "APP_NAME",
sendAllOnType: false
});