Frontend
All frontend integrations on one place.
Installation
npm i errorlogger-sdk --save
- ErrorLoggerClientOptions
Short summary of ErrorLoggerClientOptions:
Property
Type
Description
dsn
string
Represents an api key which authorizes you with API
environment
string
Represents in which environment you want to log errors. Valid options (development | production)
data
object
Additional data you want to log. EX. Network connection
VueJS
VUE_APP_ERRORLOGGER_DSN=<DSN-HERE>
import { ErrorLoggerClient } from 'errorlogger-sdk/build/client/ErrorLoggerClient'
new ErrorLoggerClient({
dsn: process.env.VUE_APP_ERRORLOGGER_DSN,
environment: 'production'
});
You are good to go. Happy coding :)!
React
REACT_APP_ERRORLOGGER_DSN=<DSN-HERE>
import { ErrorLoggerClient } from 'errorlogger-sdk/build/client/ErrorLoggerClient'
new ErrorLoggerClient({
dsn: process.env.REACT_APP_ERRORLOGGER_DSN,
environment: 'production'
});
render(
<StrictMode>
<StoreProvider store={store}>
<App />
</StoreProvider>
</StrictMode>,
document.getElementById("root")
);
You are good to go. Happy coding :)!
Angular
export const environment: IEnvironment = {
production: false,
errorLoggerDsn: '<DSN-HERE>'
}
import { environment } from '../environments/environment';
import { ErrorLoggerClient } from 'errorlogger-sdk/build/client/ErrorLoggerClient'
new ErrorLoggerClient({
dsn: environment.errorLoggerDsn,
environment: 'production'
});
You are good to go. Happy coding :)!
Last updated
Was this helpful?