Log Commands

The following are log commands.

Create a log within a specified log group

oci logging log create --display-name <log_name> --log-group-id <log_group_OCID> 
 --log-type <SERVICE_or_CUSTOM>

This call fails if the log group has already been created with the same displayName or (service, resource, category) triplet.

Get the log object configuration for the log object OCID

oci logging log get --log-group-id <log_group_OCID> --log-id <log_OCID>

List the specified log group's log objects

oci logging log list --log-group-id <log_group_OCID>

Move a log into a different log group within the same tenancy

oci logging log change-log-group --log-group-id <log_group_OCID> --log-id <log_OCID>

When provided, the If-Match is checked against the ETag values of the resource.

To delete a log object in a log group

If you have an issue with deleting a log object, open a command prompt and run the following command to delete it:

oci logging log delete --log-group-id <log_group_OCID> --log-id <log_OCID>

To ingest logs associated with a logId

oci logging-ingestion put-logs --log-entry-batches --log-id --specversion

List all services supporting logging

oci logging service list

Update an existing log object with the associated configuration

oci logging log update --log-group-id <log_group_OCID> --log-id <log_OCID>

This call fails if the log object does not exist.