adobe / aio-cli

Adobe I/O Extensible CLI
https://www.adobe.io
Apache License 2.0
77 stars 33 forks source link

Log tail + forwarding #441

Open purplecabbage opened 1 year ago

purplecabbage commented 1 year ago

Expected Behavior

When forwarding logs to Splunk, aio rt logs command does not works and sends this message:

Namespace is configured with custom log forwarding destination: 'splunk_hec'. Please use corresponding logging platform to view logs.

Actual Behavior

If you run aio rt logs --tail in 1 tab and configure Splunk forwarding in a different tab, then you will continue to see logs both in Splunk and terminal until you decide to close your terminal.

aiojbot commented 1 year ago

JIRA issue created: https://jira.corp.adobe.com/browse/ACNA-2306

buskamuza commented 1 year ago

It is not intended behavior that aio rt logs returns logs in case of custom log forwarding because aio rt can't fetch logs from a custom destination. Due to recent change in the logging configuration, logs are duplicated and sent to Adobe-managed system as well in case of custom log forwarding. So aio rt logs can actually fetch logs while the command is still running. But if it will be restarted after custom log forwarding is configured, it will fail due to client-side validation. It is not guaranteed that logs will be duplicated to an Adobe system in case custom log forwarding is configured, so aio rt logs returning logs while still running is just a side-effect.