Using the Logging API

For reference documentation for the API, see Logging API.

For sample code, including instructions for setting up client libraries, see Logging's Client Libraries. For additional code samples, see Writing and Managing Logs and Exporting Logs.

To try out the API, you can make calls right from your browser using the APIs Explorer. For a command-line interface to the Logging API, see gcloud logging command.

Setup tasks

For instructions on setting up client libraries and authorizing the Logging API, with sample code, see Logging API Client Libraries.

As bibliotecas de cliente podem usar o Application Default Credentials para se autenticar facilmente em APIs do Google e enviar solicitações para essas APIs. Com o Application Default Credentials, você pode testar o aplicativo localmente e implementá-lo sem alterar o código subjacente. Para mais informações, inclusive amostras de código Guia de autenticação do Google Cloud Platform.

You can restrict how much access your application has to Logging data by using Cloud IAM permissions and roles. For more information, see Logging Access Control Guide.