·Î±× :: 󸮱⠼øÀ§ ¹× ¿ä¾à
- ƯÇã:
- Perl Artistic License
- °Ô½ÃÀÚ À̸§:
- Jonny Schulz
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://search.cpan.org/~bloonix/
·Î±× :: 󸮱â ű×
·Î±× :: 󸮱⠼³¸í
log :: Çڵ鷯´Â ·Î±ë, ÃßÀû ¹× µð¹ö±ëÀ»À§ÇÑ °´Ã¼ ÁöÇâ 󸮱âÀÔ´Ï´Ù. ±×°ÍÀº ¸Å¿ì ½±°Ô »ç¿ëÇϱⰡ ½±°í ¸¹Àº ±¸¼º ¸Å°³ º¯¼ö°¡ÀÖ´Â ¿©·¯ Ãâ·Â °´Ã¼¿¡ ´ëÇÑ °£´ÜÇÑ ÀÎÅÍÆäÀ̽º¸¦ Á¦°øÇÕ´Ï´Ù. Ãâ·Â ´ç ´ç ¹Ù´Ú¿¡ ±â·Ï µÈ Á¤º¸ÀÇ ¾çÀ» ½±°Ô ÇÊÅ͸µÇÏ°í, ¿ì¼± ¼øÀ§¸¦ Á¤ÀÇÇÏ°í, ¸Þ½ÃÁö¸¦ Æ÷¸ËÇÏ°í ¿ÏÀüÇÑ ·Î±ë ¸Ó½ÅÀ» Àç·ÎµåÇϱâ À§ÇØ ÆÐÅÏ ÀÛ¼ºÀ» ½±°Ô ÀÛ¼ºÇÒ ¼ö ÀÖ½À´Ï´Ù. ÀÚ¼¼ÇÑ ³»¿ëÀº ¹®¼¸¦ ¹®¼ÈÇÕ´Ï´Ù. ³» $ log = log :: handler-> new (); $ log-> add (file => {filename => "file.log", maxlevel => "debug", minlevel => "°æ°í",}); $ log-> °æ°í ( "¸Þ½ÃÁö"); ¶Ç´Â log :: Çڵ鷯¸¦ »ç¿ëÇϽʽÿÀ; $ log = log :: handler-> new (screen => {log_to => "stdout", maxlevel => "debug", minlevel => "debug", message_layout => "% t % m ( % c) ",}, screen => {log_to =>"info ", minlevel =>"info ",}, screen => {log_to =>"stderr ", maxlevel =>" ", Minlevel =>"ºñ»ó ",},); ·Î±× :: 󸮱⸦ »ç¿ëÇϽʽÿÀ. ³» $ log = log :: handler-> new (); $ log-> config (config => "logger.conf"); # ¹× ¾Æ¸¶µµ ³ªÁß¿¡ $ log-> reload (config => "logger.conf"); ¶Ç´Â # ÀÀ¿ë ÇÁ·Î±×·¥À» ¸¸µì´Ï´Ù Wide Logger ÆÐÅ°Áö MyApp; ·Î±× :: 󸮱⸦ »ç¿ëÇϽʽÿÀ. ³» $ log = log :: handler-> create_logger ( "myApp"); $ log-> add (ȸé => {maxlevel => "Á¤º¸"}); $ log-> Á¤º¸ ( "Á¤º¸ ¸Þ½ÃÁö"); # get_logger () ÆÐÅ°Áö·Î Logger °¡Á® ¿À±â MyApp :: Admin; ·Î±× :: 󸮱⸦ »ç¿ëÇϽʽÿÀ. ³» $ log = log :: handler-> get_logger ( "myApp"); $ log-> Á¤º¸ ( "myApp :: admin"¿¡¼ "Á¤º¸ ¸Þ½ÃÁö); Á¦Ç°ÀÇ È¨ÆäÀÌÁö
·Î±× :: 󸮱⠰ü·Ã ¼ÒÇÁÆ®¿þ¾î