Appender yog dab tsi?
Appender yog dab tsi?

Video: Appender yog dab tsi?

Video: Appender yog dab tsi?
Video: Kuv rov tuaj qhia kuv tsob tshuaj pub nej dua 2024, Kaum ib hlis
Anonim

Cov appender yog ib feem ntawm lub kaw lus kaw lus uas yog lub luag haujlwm xa cov lus kaw mus rau qee qhov chaw lossis nruab nrab.

Ib yam li ntawd, log4j Appender yog dab tsi?

Log4j Appenders . log4j muab Appender cov khoom uas yog lub luag haujlwm tseem ceeb rau kev luam ntawv lo lus nkag mus rau qhov chaw sib txawv xws li console, cov ntaub ntawv, NT qhov kev tshwm sim cav, Swing Cheebtsam, JMS, tej thaj chaw deb UNIX syslog daemons, qhov (socket), thiab lwm yam.

Tsis tas li ntawd, lub hauv paus logger yog dab tsi? Qhov yooj yim logger uas zaum saum lub logger hierarchy yog rootlogger . RootLogger yog ib txwm logger , txawm hais tias nws tsis tuaj yeem raug muab rau qib null thiab vim nws tsis tuaj yeem muaj niam txiv, getChainedLevel() API txoj kev ib txwm rov qab tus nqi ntawm qib teb yam tsis tau taug kev hierarchy.

Hais txog qhov no, log4j Appender ua haujlwm li cas?

Cov khoom tseem ceeb / teeb tsa hauv lub cog 4j framework uas peb ua haujlwm nrog cov loggers, appenders , layouts, qauv, thiab log-theem. Loggers yog cov khoom uas muaj npe los ntawm daim ntawv thov ua rau kev hu xov tooj. Ib appender yog qhov chaw uas cov cav raug kaw, piv txwv li. console, file, db thiab lwm yam.

Dab tsi yog qhov txawv ntawm logger info thiab logger debug?

Thaum koj tau enabled lub debug los yog siab dua qib nyob rau hauv koj configuration. Nws nyob ntawm qhov twg qib koj xaiv hauv koj cov ntaub ntawv log4j teeb tsa. Yog koj qib yog " cov ntaub ntawv " (los ntawm lub neej ntawd), logger . Txawm li cas los xij, yog tias koj qib yog " debug ", nws yuav.

Pom zoo: