-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support entry labels #1668
Support entry labels #1668
Conversation
Labels can be passed in explicitly to the 'log_text', 'log_struct', or 'log_proto' methods. If not passed, any default values configured on the logger instance will be used. See: #1566.
|
||
labels = self._get_labels(labels) | ||
if labels is not None: | ||
data['entries'][0]['labels'] = labels |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
It was needed earlier for batch support, but was masked by the attribute on the mock '_Logger' used by the batch tests.
@@ -78,7 +88,51 @@ def batch(self, client=None): | |||
client = self._require_client(client) | |||
return Batch(self, client) | |||
|
|||
def log_text(self, text, client=None): | |||
def _make_entry_resource(self, text=None, info=None, message=None, |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
LGTM. 7 commits seems like a lot? |
Two of the commits are bugfixes for already-merged-to- |
You can do with the commits as you see fit. You are go to merge on my end. |
I merged as-is after aborting a rebase where I tried to clean it up. |
Fetched entries expose labels set on the back-end.
When logging, labels can be passed in explicitly to the
log_text
,log_struct
, orlog_proto
methods. If not passed, any default values configured on the logger instance will be used.See: #1566.