It is a library of Angular that allows you to Log the data to the Server.
Getting started
Step 1: Install @halfdevil/ngx-logger:
NPM
npm i @halfdevil/ngx-logger
Step 2: Import the NgxLoggingService:
import{NgxLoggingService}from'@halfdevil/ngx-logger';
@Component({selector: 'app-init',templateUrl: './app.component.html',styleUrls: ['./app.component.scss']})exportclassAppComponent{constructor(privatelogger: NgxLoggingService){this.logger.API_URL="YOUR API URL";this.logger.Request_Type="GET For Get Request, POST For Post Request";// Log Level: Infothis.logger.info("Your Message",[OptionalParams]);// Log Level: Debugthis.logger.debug("Your Message",[OptionalParams]);// Log Level: Warnthis.logger.warn("Your Message",[OptionalParams]);// Log Level: Errorthis.logger.error("Your Message",[OptionalParams]);// Log Level: Fatalthis.logger.fatal("Your Message",[OptionalParams]);// Log Level: Allthis.logger.log("Your Message",[OptionalParams]);// Want To Turn Off Logsthis.logger.level=this.logger.LogLevel.Off;// Optionalthis.logger.ShowAPIOutput=true;// Shows Output (Success, Error) in Console Log Not to be Used In Production.this.logger.logWithDate=true;// If you want to also include date of log.}}