-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4658f77
commit a488b64
Showing
6 changed files
with
83 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
/** | ||
* @typedef {object} MwLogOption | ||
* @property {number} [maxSize=100] max number of different name loggers | ||
* @property {boolean} [logAll=false] log everything even strings | ||
* @property {boolean} [levelNumbers] log levels as numbers | ||
* @property {Log} [Log] different extended Log class, e.g. LogEcs | ||
* @typedef {{ | ||
* maxSize?: number | ||
* logAll?: boolean | ||
* levelNumbers?: boolean | ||
* Log?: typeof Log | ||
* }} MwLogOption | ||
* - [maxSize=100] max number of different name loggers | ||
* - [logAll=false] log everything even strings | ||
* - [levelNumbers=false] log levels as numbers | ||
* - [Log=Log] allows overwrite of Log class | ||
*/ | ||
/** | ||
* connect middleware which logs browser based logs on server side; | ||
* sends a transparent gif as response | ||
* @param {MwLogOption} [opts] | ||
* @param {MwLogOption} [options] | ||
* @return {function} connect middleware | ||
*/ | ||
export function browserLogs(opts?: MwLogOption | undefined): Function; | ||
export function browserLogs(options?: MwLogOption | undefined): Function; | ||
/** | ||
* - [maxSize=100] max number of different name loggers | ||
* - [logAll=false] log everything even strings | ||
* - [levelNumbers=false] log levels as numbers | ||
* - [Log=Log] allows overwrite of Log class | ||
*/ | ||
export type MwLogOption = { | ||
/** | ||
* max number of different name loggers | ||
*/ | ||
maxSize?: number | undefined; | ||
/** | ||
* log everything even strings | ||
*/ | ||
logAll?: boolean | undefined; | ||
/** | ||
* log levels as numbers | ||
*/ | ||
levelNumbers?: boolean | undefined; | ||
/** | ||
* different extended Log class, e.g. LogEcs | ||
*/ | ||
Log?: Log | undefined; | ||
maxSize?: number; | ||
logAll?: boolean; | ||
levelNumbers?: boolean; | ||
Log?: typeof Log; | ||
}; | ||
import { Log } from "./node.js"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
/** | ||
* @typedef {import('./node.js').LogOptions & {Log: typeof Log}} LogOptions | ||
*/ | ||
/** | ||
* @param {string} namespace | ||
* @param {import('./node.js').LogOptions & {Log: Log}} [opts] | ||
* @param {LogOptions} [opts] | ||
*/ | ||
export function logger(namespace: string, opts?: (import("./Format.js").FormatOption & import("./LogBase.js").ExtLogBaseOptions & import("./node.js").ExtLogOptions & { | ||
Log: Log; | ||
}) | undefined): any; | ||
export function logger(namespace: string, opts?: LogOptions | undefined): any; | ||
export type LogOptions = import('./node.js').LogOptions & { | ||
Log: typeof Log; | ||
}; | ||
import { Log } from "./node.js"; |