Closed azulay7 closed 7 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.
Thank you very much. Does the logger work fluelessly In your project?
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.
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'
});
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.
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.