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 logging function overrides & add more loggers #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Ramblurr
Copy link

@Ramblurr Ramblurr commented Jun 8, 2016

  • You can now override the logger functions to hook into the instance
    loggers at runtime.
  • There are also 4 instance loggers available (debug, info, warn, and
    error). However, only debug and error are injected automatically.

* You can now override the logger functions to hook into the instance
  loggers at runtime.

* There are also 4 instance loggers available (debug, info, warn, and
  error). However, only debug and error are injected automatically.
Object.defineProperty(this, LOGGER, { value: logger });
}
export function debugLogger(key) {
return key ? window.debug(key) : instanceDebugLogger;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is debug the only type that allows providing an explicit key?

@dfreeman
Copy link
Member

Thanks for the PR!

It looks like there are some test failures as the result of this change. I'd also love to see coverage for the expected behavior of the newly-added loggers as well.

@Ramblurr
Copy link
Author

Thanks for the feedback, I'll address it and add some fixes to the PR.

@dfreeman
Copy link
Member

@Ramblurr Awesome, thanks. Sorry for the long turnaround!

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