Skip to content

Get Logs

You can retrieve logs for a specific services in Flowcore using the Flowcore CLI. This allows you to monitor and troubleshoot your deployments effectively.

Get Adapter Logs

To get logs for an adapter, you can use the flowcore logs adapter command. This command will retrieve the logs for the specified adapter.

Terminal window
flowcore logs adapter ADAPTER -s <scenario> -t <tenant> [flags]

Replace ADAPTER with the name or ID of your adapter. You can obtain your adapter ID by following the instructions in the get resources guide.

Flags

argumentabbreviationrequireddescription
--scenario-sYesThe scenario the adapter resides in.
--tenant-tYesTenant name (e.g., my-tenant). This is the name of your organization, which you can find by visiting flowcore.io.
--follow-fNoFollow the log output (similar to tail -f).
--json-jNoOutput logs in JSON format.
--limit-lNoLimit the number of log entries returned. Default is 1000.
--profileN/ANoSpecify the configuration profile to use.

Examples

To get logs for an adapter with a specific tenant and scenario:

Terminal window
flowcore logs adapter adapter-name -t tenant-name -s scenario-name

To follow the log output in real-time:

Terminal window
flowcore logs adapter adapter-name -t tenant-name -s scenario-name -f

To limit the number of log entries returned:

Terminal window
flowcore logs adapter adapter-name -t tenant-name -s scenario-name -l 100

To output logs in JSON format:

Terminal window
flowcore logs adapter adapter-name -t tenant-name -s scenario-name --json

Additional Information

Before retrieving logs, you may need to look up the adapters within a scenario. Use the following command:

Terminal window
flowcore get adapters --tenant my-tenant --scenario my-scenario

This will provide you with a list of adapters and their corresponding adapter IDs, which you can then use with the logs adapter command.