| DTRDR :: Logger. DTRDR :: Logger´Â Àü¿ª ·Î±ëÀ»À§ÇÑ Perl ¸ðµâÀÔ´Ï´Ù. |
Áö±Ý ´Ù¿î·Îµå |
DTRDR :: Logger. ¼øÀ§ ¹× ¿ä¾à
- °Ô½ÃÀÚ À̸§:
- Eric Wilhelm
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://search.cpan.org/~ewilhelm/dotReader-v0.11.2/lib/MultiTask/Minion.pm
DTRDR :: Logger. ű×
DTRDR :: Logger. ¼³¸í
DTRDR :: Logger´Â Àü¿ª ·Î±ëÀ»À§ÇÑ Perl ¸ðµâÀÔ´Ï´Ù. DTRDR :: Logger´Â ±Û·Î¹ú ·Î±ëÀ»À§ÇÑ Perl ¸ðµâÀÔ´Ï´Ù .Synopsis DTRDR :: Logger¸¦ »ç¿ëÇÕ´Ï´Ù. l-> µð¹ö±× ($ ¸Þ½ÃÁö, ...); l-> Á¤º¸ ($ ¸Þ½ÃÁö, ...); l-> °æ°í ($ ¸Þ½ÃÁö, ...); L-> ¿À·ù ($ ¸Þ½ÃÁö, ...); l-> Ä¡¸íÀû ($ message, ...); ½ºÅà Ʈ·¹À̽ºÀÇ °æ¿ì : ÇÏÀ§ ¸·´ë {l () -> logcluck ( "foo"); } ÀÚ¼¼ÇÑ Á¤º¸´Â ·Î±× :: log4perlÀ» ÂüÁ¶ÇϽʽÿÀ. ŵµ (ÇöÀç)´Â $ sig {__ warn__}¸¦ ¼³Ä¡ÇÕ´Ï´Ù. {__ warn__}¿¡¼ ¸Ö¸® À̵¿ÇÏ·Á°í ÇÒ °ÍÀÔ´Ï´Ù. @import dtrdr :: logger-> import (@args); loggerla ¹Ù·Î °¡±â °¡Á® ¿À±â ³×ÀÓ ½ºÆäÀ̽º¿¡ ´ëÇÑ ·Î°Å ¿ÀºêÁ§Æ®¸¦ ¼±ÅÃÀûÀ¸·Î ÇÏÀ§ ÅÂ±× ¸ñ·ÏÀ¸·Î µÇµ¹¸³´Ï´Ù. l ($ subtag); ¿¹ : ÆÐÅ°Áö ³» :: ÆÐÅ°Áö; ³» $ logger = l; MY $ LOGGER = L ( '# foo'); ÀÌÁ¦ $ Logger´Â 'log4perl.logger.my.package. # foo'Ŭ·¡½º¿¡ ·Î±×ÀÎÇÕ´Ï´Ù. $ subtag´Â #À» ½ÃÀÛÇؾßÇÕ´Ï´Ù. ÀÌ°ÍÀÌ »ý·«µÇ¸é ·çÆ® ¼öÁØÀÇ ·Î°Å¿¡ ´ëÇÑ ¹Ù·Î °¡±â°¡ º¯°æµË´Ï´Ù. RL ($ ű×); MY $ LOGGER = RL ( '# Foo'); Now 'log4perl.logger Ŭ·¡½º¿¡ ·Î±×ÀÎ ÇÒ $ Logger. $ ű״ #·Î ½ÃÀÛÇؾßÇÕ´Ï´Ù. ÀÌ°ÍÀÌ »ý·«µÇ¸é, $ stringÀ» Æ÷ÇÔÇÏ´Â tempfileÀ» °¡Áø $ env {thout_editor} {Thout_Editor}À» ÆíÁýÀÚ·Î µð¹ö±ë µ¥ÀÌÅ͸¦ °¡Á® ¿À´Â Æí¸®ÇÑ ¹æ¹ýÀ» »ç¿ëÇÏ¿© editorlaunches. DTRDR :: Logger-> ÆíÁý±â ($ string); ¶Ç´Â ÇÊ¿äÇÑ °æ¿ì¿¡¸¸ °ÔÀ¸¸¥ Æò°¡¸¦ ¼öÇàÇÏ·Á¸é ¹®ÀÚ¿À» ¹ÝȯÇÏ´Â ÇÏÀ§¸¦ Àü´ÞÇÕ´Ï´Ù. DTRDR :: Logger-> ÆíÁý±â (ÇÏÀ§ {do_stuff_that_takes_time ()}); DBG_DUMPSIMIRS ÆíÁý±â¿¡¼ "/ TMP / $ FILENAME"ÀÇ TEMPFILE¿¡ ¾¹´Ï´Ù. dbg_dump ($ env_name, $ filename, ÇÏÀ§ {$ content}); $ env { "dbg_ $ env_name"}ÀÌ ¼³Á¤µÈ °æ¿ì¿¡¸¸ ÀÛµ¿ÇÕ´Ï´Ù. dbg_foo = 1 ./build test ...ÀÌ dbg_dump ( 'foo', 'thisfile.txt', sub {$ blah}); ... $ blahÀÇ ³»¿ëÀ» '/tmp/thisfile.txt¿¡ ¾¹´Ï´Ù. '. ÇÏÀ§ {$ thing}´Â ¼Óµµ ÇØÅ·ÀÌÁö¸¸,ÀÌ º¯¼ö´Â ÆíÁý±â¿¡¼ ¿·Á°í ÇÒ¸¸ Å ÃæºÐÈ÷ Å« °ÍÀÔ´Ï´Ù. init dtrdr :: logger-> init (filename => foo " ); ¿ä±¸ »çÇ× : ¡¤ Perl.
DTRDR :: Logger. °ü·Ã ¼ÒÇÁÆ®¿þ¾î