@codeitwithcoffee/logglytics
v1.0.5
Published
Logger
Readme
LOGGER
Installation
npm install @codeitwithcoffee/logglyticsor
yarn add @codeitwithcoffee/logglyticsGetting api key
- Go to Logglytics Console
- Create a project
- Open that project
- Click config button on top right of the dashboard
- Copy the configuration snippet
Javascript SDK Usage
Import the logglytics
// ES6
import { default as logglytics } from '@codeitwithcoffee/logglytics';Create a config object
Create a config object from the snipper you copied in the console.
const config = {
apiKey: "apikey",
projectId: "123456",
};Create a logger instance
const logger = logglytics(config);Log messages
logger.i("Info message");
logger.d("Debug message");
logger.e("Error message");
logger.t("Trace");
logger.w("Warning message");
logger.f("Fatal message");
logger.log("INFO", "Info");
// Done....Push events
logger.event("BUTTON_1");
// Done....TODO:
- [ ] More improvements to Javascript SDK
- [ ] New SDK for Android
- [ ] New improved Console
Happy coding:)
