tsunamy
Version:
A new typesript framework
48 lines (47 loc) • 1.67 kB
TypeScript
import { Configuration } from './types/Configuration';
export declare class Log {
private static locale;
private static localeOption;
private static logFileStopped;
private static logFilePath;
private static logLevel;
private static displayCompactObject;
private static displayDepthObject;
private static breakLength;
static setLocale(configuration: Configuration): void;
/**
* Init logging configuration: level, file path...
*
* @param configuration application's configuration
*/
static initLog(configuration: Configuration): void;
static blue(s: string): void;
static logo(): string;
static logoWithColor(): string;
static debug(message: string, ...optionalParams: any[]): void;
static info(message: string, ...optionalParams: any[]): void;
static warn(message: string, ...optionalParams: any[]): void;
static err(message: string, ...optionalParams: any[]): void;
/**
* Log a message in console and file
*
* @param level of the log
* @param message to log
* @param stack true if we log the stack (useful to see where we are)
* @param optionalParams optional params to log after message
*/
private static log;
private static logInConsole;
private static logInFile;
private static levelToString;
private static colorFromLevel;
private static hasToBeLogged;
private static logFileEnabled;
private static time;
private static recursiveMkdir;
/**
* Check if we can access to the log file, if not we stop to log in file
* and log only to console
*/
private static checkAccessLogFile;
}