Skip to content

Conversation

@tseaver
Copy link
Contributor

@tseaver tseaver commented Jun 22, 2016

No description provided.

@tseaver tseaver added the api: logging Issues related to the Cloud Logging API. label Jun 22, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jun 22, 2016

import json

# pylint: disable=import-error

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@daspecster
Copy link
Contributor

How do we feel about the pragma/pylint overrides?

@tseaver
Copy link
Contributor Author

tseaver commented Jun 22, 2016

@daspecster

How do we feel about the pragma/pylint overrides?

I have very little respect the opinions involved in numerical limits in pylintrc_default / pylintrc_testing, especially where we dial up and down the numbers over time. @dhermes has a different opinion about the numerical limits.

In testcase methods, too-many-lines is completely bogus: adding an assertion to a testcase which pushes it over some arbitrary limit does not magically make the method "wrong" -- it clearly improves it.

For functions like _log_entry_mapping_to_pb, too-many-branches is equally wrong: chopping that function up in to pieces to satisfy that opinion would make it harder to read and understand.

For the import issues: if we ever get to the point that grpico and friends are universally installable / importable, we can likely remove those.

:type entries: sequence of mapping
:param entries: the log entry resources to log.

:type logger_name: string

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@daspecster
Copy link
Contributor

Is this meant to be used with _LoggingAPI in /gcloud/logging/connection.py?

I guess I'm trying to understand how people would use these together in practice?

@tseaver
Copy link
Contributor Author

tseaver commented Jun 22, 2016

@daspecster

Is this meant to be used with _LoggingAPI in /gcloud/logging/connection.py?

I guess I'm trying to understand how people would use these together in practice?

The class in this PR is the GAX -protobuf-over-gRPC alternative to that class, which is the JSON-over-HTTP version providing the same API. Only one of the two will be used in any given instance, based on a) importability of the gRPC-related modules, and b) an environment variable switch. That bit will get wired in in a subsequent PR, after implementing GAX versions of the _SinksAPI and _MetricsAPI helpers.

@daspecster
Copy link
Contributor

Thanks! LGTM!

@tseaver tseaver merged commit 1124e87 into googleapis:master Jun 22, 2016
@tseaver tseaver deleted the logging-gax_logging_api_helper branch June 22, 2016 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: logging Issues related to the Cloud Logging API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants