@creejs/commons-logging
Version:
Common Utils About Logging
32 lines (31 loc) • 1.09 kB
TypeScript
/**
* A interface that All Provider module must export
* @interface
*/
export default class Provider {
/**
* Checks if a value resembles a logging provider by verifying it has required methods.
* @param {*} value - The value to check
* @returns {boolean}
*/
static isProviderLike(value: any): boolean;
/**
* Asserts that the given value is a valid provider-like object.
* @throws {Error} Throws an error if the value is not provider-like.
* @param {*} value - The value to check.
*/
static assertProviderLike(value: any): void;
/**
* The Type Name of current Provider
* @return {String} The type of the provider.
*/
getType(): string;
/**
* Create a new LogFactory instance
* @param {*} [nativeLib] - The native library to use for logging.
* @param {*} [setting] - Configuration settings for the logging provider.
* @returns {LogFactory} A new instance of LogFactory.
*/
createLogFactory(nativeLib?: any, setting?: any): LogFactory;
}
import LogFactory from './log-factory.js';