Docs Menu

Log Forwarder Configuration Files

You define log forwarder configuration files in the /log_forwarders directory.

app/
└── log_forwarders/
└── <Name>.json
log_forwarders/<name>.json
{
"name": "<name>",
"log_types": [ "<type>", ... ],
"log_statuses": [ "<status>", ... ],
"policy": { batching policy },
"action": { action configuration }
}
Field
Description
name
String
A unique name for the log forwarder.
log_types
Array<String>

An array of one or more log types that the forwarder should send to a service. Realm only forwards a log if its type is listed and its status is listed in log_statuses.

The array may contain the following log types:

  • auth
  • endpoint
  • function
  • graphql
  • push
  • schema
  • service
  • sync
  • trigger
log_statuses
Array<String>

An array of one or more log statuses that the forwarder should send to a service. Realm only forwards a log if its type is listed and its type is listed in log_types.

The array may contain the following log statuses:

  • error
  • success
policy
Object

An object that configures the forwarder's batching policy.

To forward logs individually:

{ "type": "single" }

To group logs into batches:

{ "type": "batch" }
action
Object

An object that configures where and how the forwarder sends logs.

To forward logs to a linked MongoDB collection:

{
"type": "collection",
"data_source": "<data source name>",
"database": "<database name>",
"collection": "<collection name>"
}

To forward logs with a custom function:

{
"type": "function",
"name": "<function name>"
}
←  Static Hosting Configuration FilesTrigger Configuration Files →
Give Feedback
© 2022 MongoDB, Inc.

About

  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2022 MongoDB, Inc.