Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Remove nonexistent Logger methods from types" #2434

Merged
merged 1 commit into from
Mar 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -139,6 +139,13 @@ declare namespace winston {
input: LeveledLogMethod;
silly: LeveledLogMethod;

// for syslog levels only
emerg: LeveledLogMethod;
alert: LeveledLogMethod;
crit: LeveledLogMethod;
warning: LeveledLogMethod;
notice: LeveledLogMethod;

query(
options?: QueryOptions,
callback?: (err: Error, results: any) => void

Unchanged files with check annotations Beta

* @param {!Object} options - TODO: add param description.
* @returns {undefined}
*/
configure({

Check warning on line 81 in lib/winston/logger.js

GitHub Actions / Tests (16)

Method 'configure' has too many statements (24). Maximum allowed is 15

Check warning on line 81 in lib/winston/logger.js

GitHub Actions / Tests (16)

Method 'configure' has a complexity of 19. Maximum allowed is 11

Check warning on line 81 in lib/winston/logger.js

GitHub Actions / Tests (18)

Method 'configure' has too many statements (24). Maximum allowed is 15

Check warning on line 81 in lib/winston/logger.js

GitHub Actions / Tests (18)

Method 'configure' has a complexity of 19. Maximum allowed is 11

Check warning on line 81 in lib/winston/logger.js

GitHub Actions / Tests (20)

Method 'configure' has too many statements (24). Maximum allowed is 15

Check warning on line 81 in lib/winston/logger.js

GitHub Actions / Tests (20)

Method 'configure' has a complexity of 19. Maximum allowed is 11
silent,
format,
defaultMeta,
*
*/
/* eslint-enable valid-jsdoc */
log(level, msg, ...splat) {

Check warning on line 207 in lib/winston/logger.js

GitHub Actions / Tests (16)

Method 'log' has too many statements (26). Maximum allowed is 15

Check warning on line 207 in lib/winston/logger.js

GitHub Actions / Tests (16)

Method 'log' has a complexity of 12. Maximum allowed is 11

Check warning on line 207 in lib/winston/logger.js

GitHub Actions / Tests (18)

Method 'log' has too many statements (26). Maximum allowed is 15

Check warning on line 207 in lib/winston/logger.js

GitHub Actions / Tests (18)

Method 'log' has a complexity of 12. Maximum allowed is 11

Check warning on line 207 in lib/winston/logger.js

GitHub Actions / Tests (20)

Method 'log' has too many statements (26). Maximum allowed is 15

Check warning on line 207 in lib/winston/logger.js

GitHub Actions / Tests (20)

Method 'log' has a complexity of 12. Maximum allowed is 11
// eslint-disable-line max-params
// Optimize for the hotpath of logging JSON literals
if (arguments.length === 1) {
return this.logger.write(info);
}
};

Check warning on line 51 in lib/winston/profiler.js

GitHub Actions / Tests (16)

Unnecessary semicolon

Check warning on line 51 in lib/winston/profiler.js

GitHub Actions / Tests (18)

Unnecessary semicolon

Check warning on line 51 in lib/winston/profiler.js

GitHub Actions / Tests (20)

Unnecessary semicolon
module.exports = Profiler;
return;
}
return fs.read(fd, buffer, 0, buffer.length, pos, (error, bytes) => {

Check warning on line 63 in lib/winston/tail-file.js

GitHub Actions / Tests (16)

Arrow function has too many statements (30). Maximum allowed is 15

Check warning on line 63 in lib/winston/tail-file.js

GitHub Actions / Tests (16)

Arrow function has a complexity of 13. Maximum allowed is 11

Check warning on line 63 in lib/winston/tail-file.js

GitHub Actions / Tests (18)

Arrow function has too many statements (30). Maximum allowed is 15

Check warning on line 63 in lib/winston/tail-file.js

GitHub Actions / Tests (18)

Arrow function has a complexity of 13. Maximum allowed is 11

Check warning on line 63 in lib/winston/tail-file.js

GitHub Actions / Tests (20)

Arrow function has too many statements (30). Maximum allowed is 15

Check warning on line 63 in lib/winston/tail-file.js

GitHub Actions / Tests (20)

Arrow function has a complexity of 13. Maximum allowed is 11
if (error) {
if (!iter) {
stream.emit('error', error);
* @param {Function} callback - TODO: add param description.
* @returns {undefined}
*/
log(info, callback) {

Check warning on line 44 in lib/winston/transports/console.js

GitHub Actions / Tests (16)

Method 'log' has too many statements (19). Maximum allowed is 15

Check warning on line 44 in lib/winston/transports/console.js

GitHub Actions / Tests (18)

Method 'log' has too many statements (19). Maximum allowed is 15

Check warning on line 44 in lib/winston/transports/console.js

GitHub Actions / Tests (20)

Method 'log' has too many statements (19). Maximum allowed is 15
setImmediate(() => this.emit('logged', info));
// Remark: what if there is no raw...?
if (callback) callback(null, results);
});
function add(buff, attempt) {

Check warning on line 300 in lib/winston/transports/file.js

GitHub Actions / Tests (16)

'buff' is already declared in the upper scope on line 254 column 9

Check warning on line 300 in lib/winston/transports/file.js

GitHub Actions / Tests (18)

'buff' is already declared in the upper scope on line 254 column 9

Check warning on line 300 in lib/winston/transports/file.js

GitHub Actions / Tests (20)

'buff' is already declared in the upper scope on line 254 column 9
try {
const log = JSON.parse(buff);
if (check(log)) {
return true;
}
function normalizeQuery(options) {

Check warning on line 361 in lib/winston/transports/file.js

GitHub Actions / Tests (16)

'options' is already declared in the upper scope on line 246 column 9

Check warning on line 361 in lib/winston/transports/file.js

GitHub Actions / Tests (18)

'options' is already declared in the upper scope on line 246 column 9

Check warning on line 361 in lib/winston/transports/file.js

GitHub Actions / Tests (20)

'options' is already declared in the upper scope on line 246 column 9
options = options || {};
// limit