mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
Internal logger logLog added
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/// <reference path="log4javascript.d.ts" />
|
||||
/// <reference path="./log4javascript.d.ts" />
|
||||
|
||||
function aSimpleLoggingMessageString() {
|
||||
var log = log4javascript.getDefaultLogger();
|
||||
@@ -47,4 +47,8 @@ function changingTheFormatOfLogMessages() {
|
||||
var popUpAppender = new log4javascript.PopUpAppender();
|
||||
var layout = new log4javascript.PatternLayout("[%-5p] %m");
|
||||
popUpAppender.setLayout(layout);
|
||||
}
|
||||
|
||||
function configureLogLog() {
|
||||
log4javascript.logLog.setQuietMode(true);
|
||||
}
|
||||
Vendored
+34
-26
@@ -1051,38 +1051,46 @@ declare module log4javascript {
|
||||
// #region log4javascript error handling
|
||||
|
||||
/**
|
||||
* Sets whether LogLog is in quiet mode or not. In quiet mode, no messages sent to LogLog have any visible effect. By default,
|
||||
* quiet mode is switched off.
|
||||
* @param quietMode Whether to turn quiet mode on or off.
|
||||
* log4javascript has a single rudimentary logger-like object of its own to handle messages generated by log4javascript itself.
|
||||
* This logger is called logLog and is accessed via log4javascript.logLog.
|
||||
*/
|
||||
export function setQuietMode(quietMode: boolean): void;
|
||||
export namespace logLog {
|
||||
|
||||
/**
|
||||
* Sets how many errors LogLog will display alerts for. By default, only the first error encountered generates an alert to the
|
||||
* user. If you turn all errors on by supplying true to this method then all errors will generate alerts.
|
||||
* @param showAllErrors Whether to show all errors or just the first.
|
||||
*/
|
||||
export function setAlertAllErrors(alertAllErrors: boolean): void;
|
||||
/**
|
||||
* Sets whether logLog is in quiet mode or not. In quiet mode, no messages sent to logLog have any visible effect. By default,
|
||||
* quiet mode is switched off.
|
||||
* @param quietMode Whether to turn quiet mode on or off.
|
||||
*/
|
||||
export function setQuietMode(quietMode: boolean): void;
|
||||
|
||||
/**
|
||||
* Logs a debugging message to an in-memory list.
|
||||
*/
|
||||
export function debug(message: string, exception?: Error): void;
|
||||
/**
|
||||
* Sets how many errors logLog will display alerts for. By default, only the first error encountered generates an alert to the
|
||||
* user. If you turn all errors on by supplying true to this method then all errors will generate alerts.
|
||||
* @param showAllErrors Whether to show all errors or just the first.
|
||||
*/
|
||||
export function setAlertAllErrors(alertAllErrors: boolean): void;
|
||||
|
||||
/**
|
||||
* Displays an alert of all debugging messages.
|
||||
*/
|
||||
export function displayDebug(): void;
|
||||
/**
|
||||
* Logs a debugging message to an in-memory list.
|
||||
*/
|
||||
export function debug(message: string, exception?: Error): void;
|
||||
|
||||
/**
|
||||
* Currently has no effect.
|
||||
*/
|
||||
export function warn(message: string, exception?: Error): void;
|
||||
/**
|
||||
* Displays an alert of all debugging messages.
|
||||
*/
|
||||
export function displayDebug(): void;
|
||||
|
||||
/**
|
||||
* Generates an alert to the user if and only if the error is the first one encountered and setAlertAllErrors(true) has not been called.
|
||||
*/
|
||||
export function error(message: string, exception?: Error): void;
|
||||
/**
|
||||
* Currently has no effect.
|
||||
*/
|
||||
export function warn(message: string, exception?: Error): void;
|
||||
|
||||
/**
|
||||
* Generates an alert to the user if and only if the error is the first one encountered and setAlertAllErrors(true) has not been called.
|
||||
*/
|
||||
export function error(message: string, exception?: Error): void;
|
||||
|
||||
}
|
||||
|
||||
// #endregion
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user