Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Allow different tags on each log statement #35
Conversation
This comment has been minimized.
This comment has been minimized.
|
thanks @bportnoy any sample code in JS? |
|
Added some documentation - does that sample work for you? |
| 'logglyKey': 'your-customer-token', | ||
| 'sendConsoleErrors' : true, | ||
| 'tag' : 'tag1,tag2', | ||
| 'mutableTags' : true |
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
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
tgrrtt
Apr 12, 2017
@mostlyjason This is just the documentation. By default it appears that the mutableTags property on the tracker will be undefined
@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) { |
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.
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.
|
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 If not, then I can try to address some of your concerns above. Would you be open to some changes around this feature? |
|
@atdrago I don't work for Loggly anymore. Adding @Shwetajain148 to comment. |
|
@mostlyjason I was afraid that might be the case. Sorry to bother you! |
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.