| Scribehandler. Python Ç¥ÁØ ·Î±ë ¸ðµâ¿¡¼ ÀÛµ¿ÇÏ´Â °£´ÜÇÑ ÇÁ·Ï½Ã °èÃþ |
Áö±Ý ´Ù¿î·Îµå |
Scribehandler. ¼øÀ§ ¹× ¿ä¾à
- °Ô½ÃÀÚ À̸§:
- Jeremy Jones
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://search.cpan.org/~jjones/
Scribehandler. ű×
Scribehandler. ¼³¸í
°£´ÜÇÑ ÇÁ·Ï½Ã ÃþÀÌ ÆÄÀ̽ã Ç¥ÁØ ·Î±ë ¸ðµâ ÀÛÇ° ScribeHandler °£´ÜÇÑ ÇÁ·Ï½Ã ÃþÀ̶ó´Â ÆÄÀ̽ã Ç¥ÁØ ·Î±ë ¸ðµâ ÀÛÇ°. Çڵ鷯¸¦ ÀνºÅϽºÈ ÇÒ ¶§, ´ç½ÅÀº ½º Å©¶óÀÌ ºù¿¡ Á¢¼Ó ¼³Á¤À» ÁöÁ¤ÇÏ´Â °ÍÀÌ ÁÁ½À´Ï´Ù : ÀÌ°ÍÀº Ç¥ÁØ way.Important ºñÆ®ÀÇ ·Î°Å¿¡ Ãß°¡ µÈ °¡Á®¿É´Ï´Ù Çڵ鷯 °´Ã¼¸¦ ¿ªÇÒÀ»ÇÕ´Ï´Ù. ´ÙÀ½ Å°¿öµå Àμö reconized (¹× ±âº»°ª)µÇ¾î Àμö ±âº» --------------------------- È£½ºÆ® 127.0.0.1port 1463category % (È£½ºÆ® À̸§) (S) - Æ®·£½º ´ÙÀ½, Àý¾à ScribeHandler.BUFFERED °æ¿ì ¼ö¼Û ScribeHandler.FRAMED % ÀÎ °æ¿ì (loggername) stransport ScribeHandler.FRAMEDuri ¾øÀ½ - È£½ºÆ® ¹× Æ÷Æ®°¡ obvious-µÇ¾î¾ßÇÏ°í thrift.transport.TTransport.TFramedTransport´Â ()ÀÌ´Ù used.- ±³ÅëÀÌ ScribeHandler.HTTP ´ÙÀ½ thrift.transport.THttpClient.THttpClient ()°¡ »ç¿ëµÇ¸ç Àü¼ÛÀÌ ¾øÀ½ ´ÙÀ½ ÇÒ´ç ÇÒ ¼öÀÖ´Â Çã¿ë µå¸®ÇÁÆ® / ½ºÅ©¾ø´Â °æ¿ì URI°¡ ¾øÀ½ - ÀÏ ¼ö ¾ø½À´Ï´Ù °æ¿ì .transport.TTransport.TBufferedTransport´Â () used.-ÀÔ´Ï´Ù ScirbeHandler.transport = <Àü¼Û> <Àü¼Û>À» ÅëÇØ Àü¼Û À¯È¿ÇÑ Scibe / µå¸®ÇÁÆ® Àü¼ÛÀº (ÀÌ ±³Á¤ ¹Ì·¡¿¡ ½ÃµµÀÌ´Ù) .- ¹üÁÖ scribe.LogEntry () °´Ã¼·Î ºÐ·ù ÆĶó¹ÌÅÍ·Î º¯È¯µÈ´Ù. ÀÌ ¸ÅÇÎ Å°¸¦ »ç¿ëÇÏ¿© Ç¥ÁØ Çü½Ä ¹®ÀÚ¿À̾î¾ßÇÕ´Ï´Ù. Å° À̸§ ¼Ò½º ---------------------- ¸ðµâ logging.LogRecord.module levelname logging.LogRecord.levelname loggername logging.LogRecord : ´ÙÀ½Àº reconized ¸ÅÇÎ Å°ÀÔ´Ï´Ù. ¼öÀÔ loggingimport ScribeHandlermylogger = logging.getLogger ( 'ScribeLogger') mylogger.setLevel (logging.DEBUG) Çڵ鷯 = ScribeHandler.ScribeHandler (Ä«Å×°í¸® : processname logging.LogRecord.processName È£½ºÆ® À̸§ socket.gethostname () ¿©±â¸¦ »ç¿ëÇÏ´Â ¹æ¹ý¿¡ ´ëÇÑ °£´ÜÇÑ ¿¹ÀÔ´Ï´Ù À̸§À» = '% (È£½ºÆ® À̸§)ÀÇ - % (levelname)ÀÇ'file_buffer = '/ tmp¸¦ / logbuffer') mylogger.addHandler (Çڵ鷯) mylogger.debug ( '¹°°Ç ÀÏ') ¿ä±¸ »çÇ× : ¡¤ ÆÄÀ̽ã
Scribehandler. °ü·Ã ¼ÒÇÁÆ®¿þ¾î