Good Bye console.log,no console.log in 2022

yes you heard it right.

we frequently use console.log() to check our outputs in console, it’s ok in Development mode but it is highly disgraced in production.

so then what’s the solution for it.so in production we basically use production grade logge…

yes you heard it right.

we frequently use console.log() to check our outputs in console, it’s ok in Development mode but it is highly disgraced in production.

so then what’s the solution for it.so in production we basically use production grade loggers.This article is going to teach you how to use ps-logger.

Q.Why ps-logger ?
=>yes you have few other options but the problem is that you have to do lots of manual configurations in it.That’s why beginners don’t even touch production grade loggers.

ps-logger is a plug and play logger.There is no manual configurations.you have to just install and use it.

npm i ps-logger
  • Example:-
const logger=require('ps-logger');

logger.info("This is info")
logger.warn("This is warning");
logger.error("This is error");
logger.debug("This is debug");
logger.prompt("This is prompt");
logger.verbose("This is verbose");
logger.silly("This is silly");

ps-logger

  • if you want to disable its colors
logger.setColor(false);

in future updates it will provide more features to you guys


Print Share Comment Cite Upload Translate
APA
SHIVANSH PATEL | Sciencx (2024-03-29T12:20:55+00:00) » Good Bye console.log,no console.log in 2022. Retrieved from https://www.scien.cx/2021/12/31/good-bye-console-logno-console-log-in-2022/.
MLA
" » Good Bye console.log,no console.log in 2022." SHIVANSH PATEL | Sciencx - Friday December 31, 2021, https://www.scien.cx/2021/12/31/good-bye-console-logno-console-log-in-2022/
HARVARD
SHIVANSH PATEL | Sciencx Friday December 31, 2021 » Good Bye console.log,no console.log in 2022., viewed 2024-03-29T12:20:55+00:00,<https://www.scien.cx/2021/12/31/good-bye-console-logno-console-log-in-2022/>
VANCOUVER
SHIVANSH PATEL | Sciencx - » Good Bye console.log,no console.log in 2022. [Internet]. [Accessed 2024-03-29T12:20:55+00:00]. Available from: https://www.scien.cx/2021/12/31/good-bye-console-logno-console-log-in-2022/
CHICAGO
" » Good Bye console.log,no console.log in 2022." SHIVANSH PATEL | Sciencx - Accessed 2024-03-29T12:20:55+00:00. https://www.scien.cx/2021/12/31/good-bye-console-logno-console-log-in-2022/
IEEE
" » Good Bye console.log,no console.log in 2022." SHIVANSH PATEL | Sciencx [Online]. Available: https://www.scien.cx/2021/12/31/good-bye-console-logno-console-log-in-2022/. [Accessed: 2024-03-29T12:20:55+00:00]
rf:citation
» Good Bye console.log,no console.log in 2022 | SHIVANSH PATEL | Sciencx | https://www.scien.cx/2021/12/31/good-bye-console-logno-console-log-in-2022/ | 2024-03-29T12:20:55+00:00
https://github.com/addpipe/simple-recorderjs-demo