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…


This content originally appeared on DEV Community and was authored by SHIVANSH PATEL

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


This content originally appeared on DEV Community and was authored by SHIVANSH PATEL


Print Share Comment Cite Upload Translate Updates
APA

SHIVANSH PATEL | Sciencx (2021-12-31T06:30:06+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 ,<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 ]. 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 . 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: ]
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/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.