diff --git a/log4javascript/log4javascript-tests.ts b/log4javascript/log4javascript-tests.ts index 7d55c3891b..c3b77c5b69 100644 --- a/log4javascript/log4javascript-tests.ts +++ b/log4javascript/log4javascript-tests.ts @@ -1,4 +1,4 @@ -/// +/// 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); } \ No newline at end of file diff --git a/log4javascript/log4javascript.d.ts b/log4javascript/log4javascript.d.ts index 98f23d1f72..44d226d0b3 100644 --- a/log4javascript/log4javascript.d.ts +++ b/log4javascript/log4javascript.d.ts @@ -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 }