Skip to content
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

Allow different tags on each log statement #35

Closed
wants to merge 2 commits into from

Conversation

@bportnoy
Copy link

@bportnoy bportnoy commented Dec 4, 2015

This change adds a flag during initialization (mutableTags) that, when true, checks each object passed to _LTracker and if it contains a tags field, resets the tracker's tag to the new field. This allows different tags for each logging statement.

Happy to add some documentation as well.

@varshneyjayant

This comment has been minimized.

Copy link

@varshneyjayant varshneyjayant commented on d49a02f Dec 4, 2015

thanks @bportnoy any sample code in JS?

@bportnoy bportnoy force-pushed the shiftcars:master branch from a8c1e16 to 5e307ed Dec 4, 2015
@bportnoy
Copy link
Author

@bportnoy bportnoy commented Dec 4, 2015

Added some documentation - does that sample work for you?

'logglyKey': 'your-customer-token',
'sendConsoleErrors' : true,
'tag' : 'tag1,tag2',
'mutableTags' : true

This comment has been minimized.

@mostlyjason

mostlyjason Dec 8, 2015
Contributor

Maybe we should default to false since this is the current behavior, and it might be unexpected that a tag field in the data would update the tag on the URL

This comment has been minimized.

@tgrrtt

tgrrtt Apr 12, 2017

@mostlyjason This is just the documentation. By default it appears that the mutableTags property on the tracker will be undefined

tracker.tag = tag;
}
tracker.tag = tag;
if (tracker.mutableTags) {

This comment has been minimized.

@mostlyjason

mostlyjason Dec 8, 2015
Contributor

It seems this won't work if they initialize the library with mutableTags=false and tag=some value. We want to allow it to set during initialization.

@atdrago
Copy link

@atdrago atdrago commented Aug 30, 2018

Hey @mostlyjason and others! I'd like to use this feature and I'm wondering if I could pick up where it left off.

My first question is: Is it desired that tag stay immutable? I expected that I would be able to tag different logs with tags like error or warning, depending on the case.

If not, then I can try to address some of your concerns above. Would you be open to some changes around this feature?

@mostlyjason
Copy link
Contributor

@mostlyjason mostlyjason commented Aug 30, 2018

@atdrago I don't work for Loggly anymore. Adding @Shwetajain148 to comment.

@atdrago
Copy link

@atdrago atdrago commented Aug 30, 2018

@mostlyjason I was afraid that might be the case. Sorry to bother you!

@bportnoy bportnoy closed this Nov 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.