Skip to content

Commit

Permalink
fix: improve ts output for create logger
Browse files Browse the repository at this point in the history
  • Loading branch information
mister-ben committed Jun 9, 2024
1 parent fc1f7a6 commit dcc270c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
"shelljs": "^0.8.5",
"shx": "^0.3.2",
"sinon": "^11.1.1",
"typescript": "^5.5.0-beta",
"typescript": "^5.5.1-rc",
"uglify-js": "^3.6.0",
"unified": "^7.0.2",
"videojs-generate-karma-config": "^8.1.0",
Expand Down
6 changes: 3 additions & 3 deletions src/js/utils/create-logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,17 +104,17 @@ export default function createLogger(name, delimiter = ':', styles = '') {
* @param {...*} args
* One or more messages or objects that should be logged.
*/
const log = function(...args) {
function log(...args) {
logByType('log', level, args);
};
}

// This is the logByType helper that the logging methods below use
logByType = LogByTypeFactory(name, log, styles);

/**
* Create a new subLogger which chains the old name to the new name.
*
* For example, doing `videojs.log.createLogger('player')` and then using that logger will log the following:
* For example, doing `mylogger = videojs.log.createLogger('player')` and then using that logger will log the following:
* ```js
* mylogger('foo');
* // > VIDEOJS: player: foo
Expand Down

0 comments on commit dcc270c

Please sign in to comment.