Debug
프로그래밍/Node.js
2020. 4. 8.
[Node.js] NPM Debug 모듈 사용법
A tiny JavaScript debugging utility modelled after Node.js core's debugging technique. Works in Node.js and web browsers. Debug(NPM 모듈)는 console.log()를 대신할 수 있는 로깅(디버깅) 모듈로 아래와 같은 장점을 갖고 있다. 로그를 구조화하여 구성 및 기록할 수 있다. 특정한 로그만 볼 수 있도록 지정할 수 있다. 모듈의 크기가 작아(81.5 kB) 활용하는 데에 부담이 없다. debug 모듈 사용법 const debug = require('debug'); const server = new debug('app:server'); const request = new debug('app:requ..