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 webpage provides documentation for the Google Cloud C++ client library's Logging service, specifically version 2.11.0, with links to previous and newer versions available.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version is listed as version 2.37.0-rc, and there are several previous versions linked, all the way down to 2.11.0 which is the main version covered on this page.\u003c/p\u003e\n"],["\u003cp\u003eKey classes in this version include \u003ccode\u003eLoggingServiceV2Client\u003c/code\u003e for interacting with the logging service and \u003ccode\u003eLoggingServiceV2Connection\u003c/code\u003e for managing connections.\u003c/p\u003e\n"],["\u003cp\u003eThe documentation also details structs for configuring retry and backoff policies, such as \u003ccode\u003eLoggingServiceV2BackoffPolicyOption\u003c/code\u003e and \u003ccode\u003eLoggingServiceV2RetryPolicyOption\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eSeveral type aliases are defined for different retry policies and option lists, including \u003ccode\u003eLoggingServiceV2RetryPolicy\u003c/code\u003e, \u003ccode\u003eLoggingServiceV2PolicyOptionList\u003c/code\u003e, and others, offering flexibility in managing logging service operations.\u003c/p\u003e\n"]]],[],null,["# Namespace google::cloud::logging_v2 (2.11.0)\n\nVersion 2.11.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.11.0/classgoogle_1_1cloud_1_1logging__v2_1_1LoggingServiceV2Client)\n\nService for ingesting and querying logs.\n\n### [LoggingServiceV2Connection](/cpp/docs/reference/logging/2.11.0/classgoogle_1_1cloud_1_1logging__v2_1_1LoggingServiceV2Connection)\n\nThe [`LoggingServiceV2Connection`](/cpp/docs/reference/logging/2.11.0/classgoogle_1_1cloud_1_1logging__v2_1_1LoggingServiceV2Connection) object for [`LoggingServiceV2Client`](/cpp/docs/reference/logging/2.11.0/classgoogle_1_1cloud_1_1logging__v2_1_1LoggingServiceV2Client).\n\n### [LoggingServiceV2ConnectionIdempotencyPolicy](/cpp/docs/reference/logging/2.11.0/classgoogle_1_1cloud_1_1logging__v2_1_1LoggingServiceV2ConnectionIdempotencyPolicy)\n\nStructs\n-------\n\n### [LoggingServiceV2BackoffPolicyOption](/cpp/docs/reference/logging/2.11.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.11.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.11.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.11.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.11.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.11.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.11.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."]]