Cov txheej txheem:

Winston logger yog dab tsi?
Winston logger yog dab tsi?

Video: Winston logger yog dab tsi?

Video: Winston logger yog dab tsi?
Video: Laus laus tav no mam hnov koj moo 1/4/2019 2024, Kaum ib hlis
Anonim

winston yog tsim los ua ib qho yooj yim thiab universal kaw lus tsev qiv ntawv nrog kev txhawb nqa rau ntau yam kev thauj mus los. Kev thauj mus los yog qhov tseem ceeb ntawm cov cuab yeej khaws cia rau koj cov cav. Txhua winston logger tuaj yeem muaj ntau yam kev thauj mus los (saib: Kev thauj mus los) tau teeb tsa ntawm ntau qib (saib: Kev sau npe qib).

Ib yam li ntawd, kuv yuav siv Winston logger hauv node JS li cas?

Yuav Siv Winston li cas rau Log Node. js Cov ntawv thov

  1. Kauj ruam 1 - Tsim ib qho yooj yim Node/Express App. Ib qho kev siv rau Winston yog kaw cov xwm txheej los ntawm cov ntawv thov web tsim nrog Node.
  2. Kauj ruam 2 - Customizing Node. js Application.
  3. Kauj ruam 3 - Txhim kho thiab teeb tsa Winston. Peb tam sim no npaj rau nruab thiab teeb tsa Winston.
  4. Kauj Ruam 4 - Kev koom ua ke Winston nrog peb daim ntawv thov.

Tsis tas li ntawd, Morgan logger yog dab tsi? Morgan . Morgan yog HTTP thov logger Middleware rau Node. js. Nws ua kom yooj yim cov txheej txheem ntawm kev thov nkag rau koj daim ntawv thov. Tej zaum koj yuav xav txog Morgan ua tus pab uas tsim cov ntawv thov.

Ua kom pom qhov no, Winston hauv node JS yog dab tsi?

Winston yog ib lub tsev qiv ntawv nrov tshaj plaws thiab muaj ntau yam khoom siv rau Node . js . Nrog Winston , koj tuaj yeem sib txawv thiab hloov koj cov cav mus rau qhov chaw sib txawv nyob ntawm lawv qhov hnyav lossis lub hom phiaj, thiab xyuas kom muaj cov ntaub ntawv rov ua dua thaum muaj kev ua tsis tiav lossis kev noj nyiaj txiag tom qab.

Puas yog Winston logger async?

Pab pawg Nodejitsu tau tso tawm Winston , ib pluggable, async logger rau Node. js uas tseem txhawb nqa ntau yam kev thauj mus los. Tawm ntawm lub thawv, Winston suav nrog ntau qhov kev thauj mus los suav nrog: Console: Cov khoom xa tawm mus rau lub davhlau ya nyob twg.

Pom zoo: