The returned connection object should not be used directly; instead it should be passed as an argument to the constructor ofLoggingServiceV2Client.
The optionaloptionsargument may be used to configure aspects of the returnedLoggingServiceV2Connection. Expected options are any of the types in the following option lists:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eThis document details the C++ logging library, specifically focusing on version 2.12.0, with links to other versions ranging from 2.37.0-rc to 2.11.0.\u003c/p\u003e\n"],["\u003cp\u003eThe library provides classes such as \u003ccode\u003eLoggingServiceV2Client\u003c/code\u003e and \u003ccode\u003eLoggingServiceV2Connection\u003c/code\u003e for managing log ingestion and querying within the \u003ccode\u003egoogle::cloud::logging_v2\u003c/code\u003e namespace.\u003c/p\u003e\n"],["\u003cp\u003eKey structures include options for configuring backoff, retry, and idempotency policies, like \u003ccode\u003eLoggingServiceV2BackoffPolicyOption\u003c/code\u003e, \u003ccode\u003eLoggingServiceV2RetryPolicyOption\u003c/code\u003e, and \u003ccode\u003eLoggingServiceV2ConnectionIdempotencyPolicyOption\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe function \u003ccode\u003eMakeLoggingServiceV2Connection\u003c/code\u003e is used to construct a \u003ccode\u003eLoggingServiceV2Connection\u003c/code\u003e object, allowing for configuration via various option lists like \u003ccode\u003eCommonOptionList\u003c/code\u003e and \u003ccode\u003eGrpcOptionList\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eLoggingServiceV2PolicyOptionList\u003c/code\u003e type alias aggregates options for configuring various policies related to LoggingServiceV2 within the library.\u003c/p\u003e\n"]]],[],null,["# Namespace google::cloud::logging_v2 (2.12.0)\n\nVersion 2.12.0keyboard_arrow_down\n\n- [2.42.0-rc (latest)](/cpp/docs/reference/logging/latest/namespacegoogle_1_1cloud_1_1logging__v2)\n- [2.41.0](/cpp/docs/reference/logging/2.41.0/namespacegoogle_1_1cloud_1_1logging__v2)\n- [2.40.0](/cpp/docs/reference/logging/2.40.0/namespacegoogle_1_1cloud_1_1logging__v2)\n- [2.39.0](/cpp/docs/reference/logging/2.39.0/namespacegoogle_1_1cloud_1_1logging__v2)\n- [2.38.0](/cpp/docs/reference/logging/2.38.0/namespacegoogle_1_1cloud_1_1logging__v2)\n- [2.37.0](/cpp/docs/reference/logging/2.37.0/namespacegoogle_1_1cloud_1_1logging__v2)\n- [2.36.0](/cpp/docs/reference/logging/2.36.0/namespacegoogle_1_1cloud_1_1logging__v2)\n- [2.35.0](/cpp/docs/reference/logging/2.35.0/namespacegoogle_1_1cloud_1_1logging__v2)\n- [2.34.0](/cpp/docs/reference/logging/2.34.0/namespacegoogle_1_1cloud_1_1logging__v2)\n- [2.33.0](/cpp/docs/reference/logging/2.33.0/namespacegoogle_1_1cloud_1_1logging__v2)\n- [2.32.0](/cpp/docs/reference/logging/2.32.0/namespacegoogle_1_1cloud_1_1logging__v2)\n- [2.31.0](/cpp/docs/reference/logging/2.31.0/namespacegoogle_1_1cloud_1_1logging__v2)\n- [2.30.0](/cpp/docs/reference/logging/2.30.0/namespacegoogle_1_1cloud_1_1logging__v2)\n- [2.29.0](/cpp/docs/reference/logging/2.29.0/namespacegoogle_1_1cloud_1_1logging__v2)\n- [2.28.0](/cpp/docs/reference/logging/2.28.0/namespacegoogle_1_1cloud_1_1logging__v2)\n- [2.27.0](/cpp/docs/reference/logging/2.27.0/namespacegoogle_1_1cloud_1_1logging__v2)\n- [2.26.0](/cpp/docs/reference/logging/2.26.0/namespacegoogle_1_1cloud_1_1logging__v2)\n- [2.25.1](/cpp/docs/reference/logging/2.25.1/namespacegoogle_1_1cloud_1_1logging__v2)\n- [2.24.0](/cpp/docs/reference/logging/2.24.0/namespacegoogle_1_1cloud_1_1logging__v2)\n- [2.23.0](/cpp/docs/reference/logging/2.23.0/namespacegoogle_1_1cloud_1_1logging__v2)\n- [2.22.1](/cpp/docs/reference/logging/2.22.1/namespacegoogle_1_1cloud_1_1logging__v2)\n- [2.21.0](/cpp/docs/reference/logging/2.21.0/namespacegoogle_1_1cloud_1_1logging__v2)\n- [2.20.0](/cpp/docs/reference/logging/2.20.0/namespacegoogle_1_1cloud_1_1logging__v2)\n- [2.19.0](/cpp/docs/reference/logging/2.19.0/namespacegoogle_1_1cloud_1_1logging__v2)\n- [2.18.0](/cpp/docs/reference/logging/2.18.0/namespacegoogle_1_1cloud_1_1logging__v2)\n- [2.17.0](/cpp/docs/reference/logging/2.17.0/namespacegoogle_1_1cloud_1_1logging__v2)\n- [2.16.0](/cpp/docs/reference/logging/2.16.0/namespacegoogle_1_1cloud_1_1logging__v2)\n- [2.15.1](/cpp/docs/reference/logging/2.15.1/namespacegoogle_1_1cloud_1_1logging__v2)\n- [2.14.0](/cpp/docs/reference/logging/2.14.0/namespacegoogle_1_1cloud_1_1logging__v2)\n- [2.13.0](/cpp/docs/reference/logging/2.13.0/namespacegoogle_1_1cloud_1_1logging__v2)\n- [2.12.0](/cpp/docs/reference/logging/2.12.0/namespacegoogle_1_1cloud_1_1logging__v2)\n- [2.11.0](/cpp/docs/reference/logging/2.11.0/namespacegoogle_1_1cloud_1_1logging__v2) \n\nClasses\n-------\n\n### [LoggingServiceV2Client](/cpp/docs/reference/logging/2.12.0/classgoogle_1_1cloud_1_1logging__v2_1_1LoggingServiceV2Client)\n\nService for ingesting and querying logs.\n\n### [LoggingServiceV2Connection](/cpp/docs/reference/logging/2.12.0/classgoogle_1_1cloud_1_1logging__v2_1_1LoggingServiceV2Connection)\n\nThe [`LoggingServiceV2Connection`](/cpp/docs/reference/logging/2.12.0/classgoogle_1_1cloud_1_1logging__v2_1_1LoggingServiceV2Connection) object for [`LoggingServiceV2Client`](/cpp/docs/reference/logging/2.12.0/classgoogle_1_1cloud_1_1logging__v2_1_1LoggingServiceV2Client).\n\n### [LoggingServiceV2ConnectionIdempotencyPolicy](/cpp/docs/reference/logging/2.12.0/classgoogle_1_1cloud_1_1logging__v2_1_1LoggingServiceV2ConnectionIdempotencyPolicy)\n\nStructs\n-------\n\n### [LoggingServiceV2BackoffPolicyOption](/cpp/docs/reference/logging/2.12.0/structgoogle_1_1cloud_1_1logging__v2_1_1LoggingServiceV2BackoffPolicyOption)\n\nUse with [`google::cloud::Options`](https://cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Options.html) to configure the backoff policy.\n\n### [LoggingServiceV2ConnectionIdempotencyPolicyOption](/cpp/docs/reference/logging/2.12.0/structgoogle_1_1cloud_1_1logging__v2_1_1LoggingServiceV2ConnectionIdempotencyPolicyOption)\n\nUse with [`google::cloud::Options`](https://cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Options.html) to configure which operations are retried.\n\n### [LoggingServiceV2RetryPolicyOption](/cpp/docs/reference/logging/2.12.0/structgoogle_1_1cloud_1_1logging__v2_1_1LoggingServiceV2RetryPolicyOption)\n\nUse with [`google::cloud::Options`](https://cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Options.html) to configure the retry policy.\n\nFunctions\n---------\n\n### MakeLoggingServiceV2Connection(Options)\n\nA factory function to construct an object of type [`LoggingServiceV2Connection`](/cpp/docs/reference/logging/2.12.0/classgoogle_1_1cloud_1_1logging__v2_1_1LoggingServiceV2Connection). \nThe returned connection object should not be used directly; instead it should be passed as an argument to the constructor of [LoggingServiceV2Client](/cpp/docs/reference/logging/2.12.0/classgoogle_1_1cloud_1_1logging__v2_1_1LoggingServiceV2Client).\n\nThe optional `options` argument may be used to configure aspects of the returned [`LoggingServiceV2Connection`](/cpp/docs/reference/logging/2.12.0/classgoogle_1_1cloud_1_1logging__v2_1_1LoggingServiceV2Connection). Expected options are any of the types in the following option lists:\n\n- [`google::cloud::CommonOptionList`](https://cloud.google.com/cpp/docs/reference/common/latest/namespacegoogle_1_1cloud.html)\n- [`google::cloud::GrpcOptionList`](https://cloud.google.com/cpp/docs/reference/common/latest/namespacegoogle_1_1cloud.html)\n- [`google::cloud::UnifiedCredentialsOptionList`](https://cloud.google.com/cpp/docs/reference/common/latest/namespacegoogle_1_1cloud.html)\n- [`google::cloud::logging_v2::LoggingServiceV2PolicyOptionList`](/cpp/docs/reference/logging/2.12.0/namespacegoogle_1_1cloud_1_1logging__v2)\n\n| **Note:** Unexpected options will be ignored. To log unexpected options instead, set `GOOGLE_CLOUD_CPP_ENABLE_CLOG=yes` in the environment.\n\n### MakeDefaultLoggingServiceV2ConnectionIdempotencyPolicy()\n\nType Aliases\n------------\n\n### LoggingServiceV2RetryPolicy\n\n**Alias Of** : `::google::cloud::internal::TraitBasedRetryPolicy\u003c logging_v2_internal::LoggingServiceV2RetryTraits \u003e` \n\n### LoggingServiceV2LimitedTimeRetryPolicy\n\n**Alias Of** : `::google::cloud::internal::LimitedTimeRetryPolicy\u003c logging_v2_internal::LoggingServiceV2RetryTraits \u003e` \n\n### LoggingServiceV2LimitedErrorCountRetryPolicy\n\n**Alias Of** : `::google::cloud::internal::LimitedErrorCountRetryPolicy\u003c logging_v2_internal::LoggingServiceV2RetryTraits \u003e` \n\n### LoggingServiceV2PolicyOptionList\n\n**Alias Of** : `OptionList\u003c LoggingServiceV2RetryPolicyOption, LoggingServiceV2BackoffPolicyOption, LoggingServiceV2ConnectionIdempotencyPolicyOption \u003e` \nThe options applicable to LoggingServiceV2."]]