Retrieving Logs for a Container Instance
You can retrieve logs for a container instance.
- Navigate to the Container instances list page. If you need help finding the list page, see Listing Container Instances.
- Select the name of the active container instance that you want to work with. If you don't see the container instance, ensure that you're in the correct compartment.
- Select the Containers tab.
- Select the container to retrieve logs from.
- From the Actions menu, select View logs.
Use the retrieve-logs command and required parameters to retrieve logs from a container instance:
oci container-instances container retrieve-logs --container-id "$id" --file -Note
To use this command, replaceidwith the ID of your resource. The dash at the end of the command (-) outputs the logs and can be replaced with a file name.For a complete list of parameters and values for CLI commands, see the CLI Command Reference.
Run the RetrieveLogs operation to retrieve logs from a container instance.