次の方法で共有


Configure and access Azure Database for PostgreSQL - Single Server logs from the Azure portal

APPLIES TO: Azure Database for PostgreSQL - Single Server

Important

Azure Database for PostgreSQL - Single Server is on the retirement path. We strongly recommend that you upgrade to Azure Database for PostgreSQL - Flexible Server. For more information about migrating to Azure Database for PostgreSQL - Flexible Server, see What's happening to Azure Database for PostgreSQL Single Server?.

You can configure, list, and download the Azure Database for PostgreSQL logs from the Azure portal.

Prerequisites

The steps in this article require that you have Azure Database for PostgreSQL server.

Configure logging

Configure access to the query logs and error logs.

  1. Sign in to the Azure portal.

  2. Select your Azure Database for PostgreSQL server.

  3. Under the Monitoring section in the sidebar, select Server logs.

  4. To see the server parameters, select Select here to enable logs and configure log parameters.

  5. Change the parameters that you need to adjust. All changes you make in this session are highlighted in purple.

    After you have changed the parameters, select Save. Or, you can discard your changes.

From the Server Parameters page, you can return to the list of logs by closing the page.

View list and download logs

After logging begins, you can view a list of available logs, and download individual log files.

  1. Open the Azure portal.

  2. Select your Azure Database for PostgreSQL server.

  3. Under the Monitoring section in the sidebar, select Server logs.

    Tip

    The naming convention of the log is postgresql-yyyy-mm-dd_hhmmss.log. The date and time used in the file name is the time when the log was issued. The log files rotate every hour or 100 MB, whichever comes first.

  4. If needed, use the search box to quickly narrow down to a specific log, based on date and time. The search is on the name of the log.

  5. To download individual log files, select the down-arrow icon next to each log file in the table row.

Next steps