winston
๋ฒ์ ?_winston@2
winston@3
node -v
์ถ๋ ฅ: v10.15.0const winston = require('winston');
const logger = winston.createLogger({
transports: [new winston.transports.Console()],
});
logger.info('logger ok.');
const childLogger = logger.child({ test: 'test value' });
childLogger.info('child logger ok');
{"message":"logger ok.","level":"info"}
{"message":"child logger ok.","level":"info"}
TypeError: logger.child is not a function
at Object.<anonymous> (/Users/onlybalance/test/logger.js:12:28)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)
ํจ์ child()๋ ์์ง ์ถ์๋์ง ์์ Winston 3.2.0์์๋ง ์ฌ์ฉํ ์ ์์ต๋๋ค.
์ด๋ป๊ฒ ํ๋ฉด ์์ ๋ก๊ฑฐ๋ฅผ ์ฝ๊ฒ ๋ง๋ค ์ ์์ต๋๊น?
์ด๋ป๊ฒ ํ๋ฉด ์์ ๋ก๊ฑฐ๋ฅผ ์ฝ๊ฒ ๋ง๋ค ์ ์์ต๋๊น?
@joernroeder
์ด์ ์ฌ์ฉํ ์ ์์ต๋๋ค. ์ด์ ์
๋ฐ์ดํธ ๋์์ต๋๋ค.