Use this information to enable and manage logs for OCI Database with PostgreSQL database systems.
The OCI Database with PostgreSQL service uses the OCI
Logging service to manage logging for database systems. Standard limits, restrictions, and rates apply when enabling the logging features. See Logging for more information.
Tip
You can also export PostgreSQL logs, including audit logs generated by the pgaudit extension, to Object Storage. For more information, see Exporting PostgreSQL Logs to Object Storage.
Enabling Service Logs
OCI Database with PostgreSQL service logs are enabled at the database system resource level. To enable logging, you need to know the PostgreSQL database system name and the name of the compartment that contains the database system.
To enable logging for a database system using the Console, see Enable Logging on the Logs page. When you enable logging, select PostgreSQL as the service and select PostgreSQL Database Logs as the log category.
Tip
The Logging service uses log groups to organize and manage logs in logical containers. For more information, see Logs and Log Groups.
To enable logging for a database system using the API or CLI, see Creating a Log. If you use the CLI to enable logging for OCI Database with PostgreSQL, you can use the --configuration file://config.json option and provide a configuration file such as the following:
OCI Database with PostgreSQL logging is available in all the regions of the commercial realms.
Contents of a Database Log 🔗
OCI Database with PostgreSQL logs capture detailed information about database queries and parameters. Details appear as values in the data field. This value is a JSON-formatted data with the following fields.