@log4js2/core
Version:
log4js2 is a fast and lightweight logging library that enables logging flexibility within JavaScript/TypeScript applications, similar to Apache's [Log4j2 library](https://logging.apache.org/log4j/2.x/). It can also serve as a drop-in replacement for log4
42 lines (41 loc) • 1.09 kB
TypeScript
export declare class Marker {
/**
* Gets the marker for the specified name
* @param {string} name
* @returns {Marker}
*/
static getMarker(name: string): Marker;
private static _markers;
private _parents;
private _name;
/**
* Hide the constructor. We don't want people to arbitrarily make these without access to Marker#getMarker
* @param {string} name
*/
private constructor();
/**
* The name of the marker
* @returns {string}
*/
readonly name: string;
/**
* Gets the parents of the marker. This converts the WeakSet into an array
* @returns {Marker[]}
*/
getParents(): Marker[];
/**
* Returns whether or not the marker has parents
* @returns {boolean}
*/
hasParents(): boolean;
/**
* Removes the specified marker as a parent
* @param {Marker} marker
*/
remove(marker: Marker): this;
/**
* Sets the parent markers by replacing the current set
* @param {Marker} markers
*/
setParents(...markers: Marker[]): this;
}