diff --git a/lib/LoggingEvent.js b/lib/LoggingEvent.js index 4b90d00..60ce832 100644 --- a/lib/LoggingEvent.js +++ b/lib/LoggingEvent.js @@ -9,7 +9,7 @@ class LoggingEvent { /** * Models a logging event. * @constructor - * @param {String} categoryName name of category + * @param {string} categoryName name of category * @param {Log4js.Level} level level of message * @param {Array} data objects to log * @author Seth Chisamore diff --git a/lib/appenders/noLogFilter.js b/lib/appenders/noLogFilter.js index ebf5c18..aa0327a 100644 --- a/lib/appenders/noLogFilter.js +++ b/lib/appenders/noLogFilter.js @@ -4,8 +4,8 @@ const debug = require('debug')('log4js:noLogFilter'); /** * The function removes empty or null regexp from the array - * @param {Array} regexp - * @returns {Array} a filtered string array with not empty or null regexp + * @param {string[]} regexp + * @returns {string[]} a filtered string array with not empty or null regexp */ function removeNullOrEmptyRegexp(regexp) { const filtered = regexp.filter(el => ((el != null) && (el !== ''))); @@ -15,7 +15,7 @@ function removeNullOrEmptyRegexp(regexp) { /** * Returns a function that will exclude the events in case they match * with the regular expressions provided - * @param {string | Array} filters contains the regexp that will be used for the evaluation + * @param {(string|string[])} filters contains the regexp that will be used for the evaluation * @param {*} appender * @returns {function} */ diff --git a/lib/categories.js b/lib/categories.js index 23583ac..b9bb8b1 100644 --- a/lib/categories.js +++ b/lib/categories.js @@ -10,8 +10,8 @@ const categories = new Map(); * and level, if none is set on this category. * This is recursive, so each parent also gets loaded with inherited appenders. * Inheritance is blocked if a category has inherit=false - * @param {any} config - * @param {any} category the child category + * @param {*} config + * @param {*} category the child category * @param {string} categoryName dotted path to category * @return {void} */ @@ -57,7 +57,7 @@ function inheritFromParent(config, category, categoryName) { * Walk all categories in the config, and pull down any configuration from parent to child. * This includes inherited appenders, and level, where level is not set. * Inheritance is skipped where a category has inherit=false. - * @param {any} config + * @param {*} config */ function addCategoryInheritance(config) { if (!config.categories) return; diff --git a/lib/connect-logger.js b/lib/connect-logger.js index fbd057b..a7c255f 100755 --- a/lib/connect-logger.js +++ b/lib/connect-logger.js @@ -14,7 +14,7 @@ const DEFAULT_FORMAT = * for the assemble_tokens function at low, to pass the tests. * * @param {IncomingMessage} req - * @return {String} + * @return {string} * @api private */ function getUrl(req) { @@ -111,9 +111,9 @@ function assembleTokens(req, res, customTokens) { /** * Return formatted log line. * - * @param {String} str + * @param {string} str * @param {Array} tokens - * @return {String} + * @return {string} * @api private */ function format(str, tokens) { @@ -126,7 +126,7 @@ function format(str, tokens) { /** * Return RegExp Object about nolog * - * @param {String|Array} nolog + * @param {(string|Array)} nolog * @return {RegExp} * @api private * diff --git a/lib/levels.js b/lib/levels.js index d7ca362..80c346e 100644 --- a/lib/levels.js +++ b/lib/levels.js @@ -21,7 +21,7 @@ class Level { /** * converts given String to corresponding Level - * @param {Level|String} sArg -- String value of Level OR Log4js.Level + * @param {(Level|string)} sArg -- String value of Level OR Log4js.Level * @param {Level} [defaultLevel] -- default Level, if no String representation * @return {Level} */