Skip to content

Commit

Permalink
feat: add createNewLogger method
Browse files Browse the repository at this point in the history
  • Loading branch information
Dzianis Dashkevich committed Sep 20, 2023
1 parent cde0aca commit ee046df
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/js/utils/create-logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,21 @@ export default function createLogger(name, delimiter = ':', styles = '') {
return createLogger(resultName, resultDelimiter, resultStyles);
};

/**
* Create a new logger.
*
* @param {string} newName
* The name for the new logger
* @param {string} [newDelimiter]
* Optional delimiter
* @param {string} [newStyles]
* Optional styles
* @return {Object}
*/
log.createNewLogger = (newName, newDelimiter, newStyles) => {
return createLogger(newName, newDelimiter, newStyles);

Check warning on line 149 in src/js/utils/create-logger.js

View check run for this annotation

Codecov / codecov/patch

src/js/utils/create-logger.js#L149

Added line #L149 was not covered by tests
};

/**
* Enumeration of available logging levels, where the keys are the level names
* and the values are `|`-separated strings containing logging methods allowed
Expand Down

0 comments on commit ee046df

Please sign in to comment.