File

projects/netgrif-components-core/src/lib/logger/publishers/log-publisher.ts

Index

Properties
Methods

Constructor

constructor(publisherService: LogPublisherService)
Parameters :
Name Type Optional
publisherService LogPublisherService No

Properties

Protected location
Type : string

Methods

Abstract clear
clear()
Returns : void
Abstract log
log(entry: LogEntry)
Parameters :
Name Type Optional
entry LogEntry No
Returns : void
import {LogEntry} from '../models/log-entry';
import {LogPublisherService} from '../services/log-publisher.service';

export abstract class LogPublisher {

    protected location: string;

    constructor(publisherService: LogPublisherService) {
        publisherService
            .register(this)
            .subscribe(entry => {
                if (entry) {
                    this.log(entry);
                }
            });
    }

    abstract log(entry: LogEntry): void;

    abstract clear(): void;
}

result-matching ""

    No results matching ""