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.
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
argument | abbreviation | required | description |
---|---|---|---|
--scenario | -s | Yes | The scenario the adapter resides in. |
--tenant | -t | Yes | Tenant name (e.g., my-tenant ). This is the name of your organization, which you can find by visiting flowcore.io. |
--follow | -f | No | Follow the log output (similar to tail -f ). |
--json | -j | No | Output logs in JSON format. |
--limit | -l | No | Limit the number of log entries returned. Default is 1000. |
--profile | N/A | No | Specify the configuration profile to use. |
Examples
To get logs for an adapter with a specific tenant and scenario:
flowcore logs adapter adapter-name -t tenant-name -s scenario-name
To follow the log output in real-time:
flowcore logs adapter adapter-name -t tenant-name -s scenario-name -f
To limit the number of log entries returned:
flowcore logs adapter adapter-name -t tenant-name -s scenario-name -l 100
To output logs in JSON format:
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:
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.