@tableau/taco-toolkit
Version:
Tableau Connector Toolkit
52 lines (51 loc) • 1.33 kB
TypeScript
import { LogLevel } from '../../shared/logger/log-level';
interface AppLoggerConfig {
level: LogLevel;
endpoint: string;
headers: Record<string, string>;
}
/**
* A logger class for logging connector app messages.
*
* - Connector code can utilize the static methods directly without requiring explicit initialization.
* - All logged messages will be displayed in the browser console and written to the connector's log file.
*
* @class AppLogger
*/
export declare class AppLogger {
private static instance;
private constructor();
/** @ignore */
static init(config: AppLoggerConfig): void;
/**
* Logs an information message.
*
* @example
* Logger.info('This is an information message.');
*/
static info(message: unknown): void;
/**
* Logs an error message.
*
* @example
* Logger.error('This is an error message.');
*/
static error(message: unknown): void;
/**
* Logs a warning message.
*
* @example
* Logger.warn('This is a warning message.');
*/
static warn(message: unknown): void;
/**
* Logs a debug message.
*
* @example
* Logger.debug('This is a debug message.');
*/
static debug(message: unknown): void;
/** @ignore */
static flush(): void;
}
export {};