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

Refactor logger for message cleanup #67

Merged
merged 1 commit into from
Aug 27, 2020
Merged

Conversation

van-fs
Copy link
Member

@van-fs van-fs commented Aug 27, 2020

I refactor the logger a bit to do two things:

  1. Allow a more generic way to provide context. Previously, important identifiers like rule ID, selector, path, etc got put into the message because that was all we had. This is problematic because when there are multiple identifiers, the message can be rather long. Another issue is that we sometimes use selector, source, and path interchangeably. Now that these are better defined from the shim PR, we can send these to FullStory as discrete name:value pairs in a custom payload.

  2. Add an option to configure FullStory as the log appender. This was possible before, but the code was part of the window expando. Now the code is in Logger, and you'll do window['_dlo_appender'] = 'fullstory'. We'll still accept a custom LogAppender but code was added to also conditionally accept a string alias like fullstory and console.

@TrevorFSmith TrevorFSmith merged commit c625344 into main Aug 27, 2020
@TrevorFSmith TrevorFSmith deleted the van/logging-cleanup branch August 27, 2020 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants