Tgure / ngx-loggly-logger

ngx loggly service
MIT License
7 stars 8 forks source link

something wrong with http provider #1

Closed azulay7 closed 7 years ago

azulay7 commented 8 years ago

untitled

zone.js:357Error: Uncaught (in promise): Error: Error in ./AppComponent class AppComponent - inline template:7:0 caused by: No provider for Http!(…)consoleError @ zone.js:357_loop_1 @ zone.js:382drainMicroTaskQueue @ zone.js:386 client?93b6:38 [WDS] Errors while compiling.

I think this solution is adjust to previous BETA version of angular2, cause is looking for HTTP_PROVIDERS.

Tgure commented 8 years ago

@azulay7 You are correct, the project I use it in has HTTP_PROVIDERS imported which is why it works for me. I will be super busy for awhile but will try and get this updated to work without that as soon as I can.

azulay7 commented 8 years ago

Thank you very much. Does the logger work fluelessly In your project?

Tgure commented 8 years ago

Yeah I have it running in two Angular 2.0.0 apps and it works just fine. Both apps started in RC versions of Angular so have only been updated to 2.0.0 but do still have some deprecated RC stuff lingering.

azulay7 commented 8 years ago

My apology, I have a few questions: Can you config the logger to log to a remote server? Does it work with appender? Does it uses framework such as log4j? Can you please describe each parmas: // Init to set key and tag and sendConsoleErrors boolean
this._logglyService.push({ 'logglyKey': 'Your Loggly Key goes here', 'sendConsoleErrors' : true, // Optional set true to send uncaught console errors 'tag' : 'loggly-logger' });

Tgure commented 8 years ago

This is only made to work with an account with Loggly, https://www.loggly.com/. The logglyKey is your key you get in your loggly account, sendConsoleErrors will log uncaught errors that typically go to console to loggly as well if set to true, and the tag is just whatever you want your logs tagged in Loggly.