refactor: use single function for api code

This commit is contained in:
Barış Soner Uşaklı
2020-10-15 12:12:01 -04:00
parent 25e4a09816
commit 5e2caf19f5
6 changed files with 60 additions and 35 deletions

View File

@@ -266,4 +266,5 @@ Sockets.warnDeprecated = (socket, replacement) => {
replacement: replacement,
});
}
winston.warn('[deprecated]\n ' + (new Error('-').stack.split('\n').slice(2, 3).join('\n')) + '\n use ' + replacement);
};