Logs

LogsService est le service qui gère la récéption et l'affichage des logs.

Importation

      

import {inject} from "inversify";
import "reflect-metadata";
import LogsService from "@adclz/fevermainlib/services/log";
 
export default class MyClass {
private LogsService: LogsService
 
constructor(@inject(LogsService) LogsService: LogsService) {
this.LogsService = LogsService
}
}
 

📜 Champs

Logs

LogsService.prototype.Logs = Array<Log>

Type: Array<Log>

Liste des logs reçus depuis la connection à Manager.

Médiateur

📢 Notifications

OnNewLog

Notifie qu'un nouveau log a été envoyé depuis Manager.

      

import {OnNewLog} from "@adclz/fevermainlib/services/log";
 
InjectedMediator.Notification(OnNewLog).Subscribe("MyClassId", DataNotification => {
console.log(DataNotification)
(parameter) DataNotification: Log
})
 

📄 Définitions

Log

Désigne un log.

import {Log, LogType} from "@adclz/fevermainlib/services/logs";
enum LogType {
    Log,
    Success,
    Warning,
    Error
}

interface Log {
    Type: LogType,
    Message: string
}