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

Add a logger wrapper class #280

Merged
merged 4 commits into from
Jul 1, 2020

Conversation

sonofflynn89
Copy link
Contributor

@sonofflynn89 sonofflynn89 commented Jun 25, 2020

  1. 130847
  2. Description:
    Create a isomorphic logger that only logs when a corresponding log level is set.
  3. updated opendata-ui changelog
  4. did not copy code thoughtlessly (see this issue)

@ajturner
Copy link
Member

@sonofflynn89 Does this logger only work in a browser? we likely would want Hub.js to be isomorphic to node + browser and be able to support the same logger calls.

instead of the core _isDebugEnabled(Window) this may be better to have a state parameter that is shared across the library and set in the right context of node via env variable or API query (up to app) or browser can set via the window query.

@ajturner
Copy link
Member

I would also recommend rather than merely a truthy state for debug there is a enumerated logLevel: "none" | "error" | "warning" | "all" or similar.

@sonofflynn89
Copy link
Contributor Author

Changed Logger to be Isomorphic

@sonofflynn89 sonofflynn89 changed the title Add a logger wrapper class and util to parse a window's query params Add a logger wrapper class Jul 1, 2020
@rweber-esri rweber-esri merged commit 3317a15 into Esri:master Jul 1, 2020
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.

4 participants