{"id":286064,"date":"2017-05-09T20:25:03","date_gmt":"2017-05-09T16:25:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=286064"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=286064","title":{"rendered":"\u041a\u0430\u043a \u044f \u043f\u0438\u0441\u0430\u043b \u0441\u0432\u043e\u0439 \u043b\u043e\u0433\u0433\u0435\u0440. \u0420\u0430\u0437\u0431\u043e\u0440 \u043e\u0448\u0438\u0431\u043e\u043a"},"content":{"rendered":"<p>\u041e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u044f \u043d\u0430\u0447\u0430\u043b \u0438\u0437\u0443\u0447\u0430\u0442\u044c Python. \u041d\u0430 \u0447\u0451\u043c \u0431\u0438\u0442\u044c \u0448\u0438\u0448\u043a\u0438 \u0431\u044b\u043b\u043e \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0430 \u0434\u0435\u043b\u0430\u0442\u044c \u0443\u043f\u0440\u0430\u0436\u043d\u0435\u043d\u0438\u044f \u0440\u0430\u0434\u0438 \u0443\u043f\u0440\u0430\u0436\u043d\u0435\u043d\u0438\u0439 \u043d\u0430\u0441\u043a\u0443\u0447\u0438\u043b\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e. \u041c\u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0435 \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0441 \u044d\u043d\u0442\u0443\u0437\u0438\u0430\u0437\u043c\u043e\u043c. \u0422\u0430\u043a \u0440\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u0438\u0434\u0435\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043b\u043e\u0433\u0433\u0435\u0440 \u0441 \u0446\u0432\u0435\u0442\u043d\u044b\u043c \u0430\u0443\u0442\u043f\u0443\u0442\u043e\u043c. \u041f\u0440\u043e\u0435\u043a\u0442 \u0431\u044b\u043b \u043d\u0430\u0437\u0432\u0430\u043d \u00abSCLogger\u00bb, \u043d\u0430\u0447\u0430\u043b\u043e \u0431\u044b\u043b\u043e \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043e. \u0427\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0432 \u0438\u0442\u043e\u0433\u0435 \u0438 \u043a\u0430\u043a\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u0440\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0431\u044b\u043b\u0438 \u0434\u043e\u043f\u0443\u0449\u0435\u043d\u044b \u0434\u0430\u043b\u0435\u0435 \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c.<a name=\"habracut\"><\/a><\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043d\u0435\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u0435, \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 <a href=\"https:\/\/github.com\/Kit-Scribe\/sclogger\">\u0442\u0443\u0442<\/a>.<br \/>  <a href=\"https:\/\/github.com\/Kit-Scribe\/pycolorize\">\u0421\u0441\u044b\u043b\u043a\u0430<\/a> \u043d\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0446\u0432\u0435\u0442\u043d\u043e\u0433\u043e \u0430\u0443\u0442\u043f\u0443\u0442\u0430.<\/p>\n<h1>\u041d\u0430\u0447\u0430\u043b\u043e \u0438 \u043f\u0435\u0440\u0432\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430<\/h1>\n<p>  \u042f \u043d\u0430\u0447\u0430\u043b \u0441 \u043f\u043e\u0438\u0441\u043a\u0430 \u043c\u043e\u0434\u0443\u043b\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u043a\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0438, \u043d\u043e \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043d\u0438 \u043e\u0434\u043d\u043e \u0438\u0437 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043f\u043e \u043a\u043e\u043b\u043e\u0440\u043e\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0442\u0440\u043e\u043a \u043d\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u043b\u043e \u0446\u0432\u0435\u0442\u0430 \u0443\u0436\u0435 \u043e\u043a\u0440\u0430\u0448\u0435\u043d\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u043a, \u043b\u0438\u0431\u043e \u043d\u0435 \u0434\u043e\u043a\u0440\u0430\u0448\u0438\u0432\u0430\u043b\u043e \u0438\u0441\u0445\u043e\u0434\u043d\u0443\u044e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/github.com\/Kit-Scribe\/pycolorize\">\u044d\u0442\u043e\u0442 \u043c\u043e\u0434\u0443\u043b\u044c<\/a>.<\/p>\n<p>  \u041f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c, \u043a\u0430\u043a \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434, \u044f \u043f\u043e\u0434\u0443\u043c\u0430\u043b \u00ab\u041a\u0430\u043a\u0438\u043c \u043b\u043e\u0433\u0433\u0435\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0438 \u0447\u0442\u043e \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0443\u043c\u0435\u0442\u044c \u0434\u0435\u043b\u0430\u0442\u044c?\u00bb. \u041e\u0442\u0432\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u043e\u0439\u2026<\/p>\n<p>  \u041b\u043e\u0433\u0433\u0435\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u0432 \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0435\u043c, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u0431\u043b\u0430\u0434\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043e\u043c:<\/p>\n<ul>\n<li>\u0414\u0435\u043b\u0430\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u0444\u0430\u0439\u043b<\/li>\n<li>\u0412\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0437\u0430\u043f\u0438\u0441\u044c\u044e, \u0435\u0441\u043b\u0438 \u0431\u044b\u043b\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u043d\u0430 \u044d\u0442\u043e<\/li>\n<li>\u0412\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u043f\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439<\/li>\n<li><s>\u0427\u0438\u0442\u0430\u0442\u044c \u043b\u043e\u0433 (\u0432\u0435\u0441\u044c; \u043f\u043e \u0442\u0438\u043f\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439)<\/s><\/li>\n<\/ul>\n<p>  \u0418 \u0442\u0443\u0442 \u043f\u0440\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u043e\u044f \u043f\u0435\u0440\u0432\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430: <b>\u043d\u0435 \u043d\u0430\u0434\u043e \u0437\u0430\u0441\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u043b\u0438\u0448\u043d\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0432 \u043a\u043b\u0430\u0441\u0441<\/b>. \u041b\u0443\u0447\u0448\u0435 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u0430\u0437\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0442\u044c \u043e\u0431\u044f\u0437\u0430\u043d\u043d\u043e\u0441\u0442\u0438 \u043f\u043e \u0440\u0430\u0437\u043d\u044b\u043c \u043c\u043e\u0434\u0443\u043b\u044f\u043c\/\u043a\u043b\u0430\u0441\u0441\u0430\u043c. \u042d\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0438 \u0434\u043b\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b, \u0438 \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438.<\/p>\n<p>  \u0422\u0438\u043f \u043e\u0448\u0438\u0431\u043e\u043a \u043b\u043e\u0433\u0433\u0435\u0440\u0430 \u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0441\u0430\u043c\u044b\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0435\u0433\u043e \u043d\u0430 \u0431\u0430\u0437\u0435 Enum. \u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u043c\u043e\u0434\u0443\u043b\u0438 \u0438 \u0441\u043e\u0437\u0434\u0430\u0451\u043c 2 \u043a\u043b\u0430\u0441\u0441\u0430: <b>Logger<\/b> \u0438 <b>MessageType<\/b>, \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u044b\u0439 \u043e\u0442 <b>Enum<\/b>.<\/p>\n<pre><code class=\"python\">from datetime import datetime from pycolorize import colorize, cprint from enum import Enum import re  # \u043f\u043e\u0437\u0436\u0435 \u043f\u0440\u043e\u044f\u0441\u043d\u0438\u0442\u0441\u044f  class MessageType(Enum):     INFO = 10     SUCCESS = 20     WARNING = 30     ERROR = 40     CRITICAL = 50  # \u0434\u043b\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u044f \u0432\u044b\u0431\u0440\u0430\u043b \u0442\u0430\u043a\u0438\u0435 \u0446\u0432\u0435\u0442\u0430 message_color = {     'INFO': 'gray',     'WARNING': 'yellow',     'ERROR': 'red',     'SUCCESS': 'cyan',     'CRITICAL': 'magenta' }  class Logger:     def __init__(self, fp, delimiter=' ', protected_mode=False):         if protected_mode:             self.__file = open(fp, 'x')         else:             self.__file = open(fp, 'w')         self.__delimiter = delimiter  # \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c          # \u0421\u0447\u0451\u0442\u0447\u0438\u043a \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439         self.__data = {             'INFO': 0,             'WARNING': 0,             'ERROR': 0,             'SUCCESS': 0,             'CRITICAL': 0             } <\/code><\/pre>\n<p>  \u0421\u0435\u0439\u0447\u0430\u0441 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0435 \u0442\u0430\u043a \u0443\u0436\u0430\u0441\u043d\u043e, \u043a\u0430\u043a \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e. \u0412 \u043f\u0435\u0440\u0432\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u044f <b>\u0434\u043e\u043f\u0443\u0441\u043a\u0430\u043b \u043e\u0448\u0438\u0431\u043a\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044f \u0432\u043c\u0435\u0441\u0442\u043e <i>protected_mode<\/i> \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 <i>filemode<\/i><\/b>. \u0422\u043e \u0435\u0441\u0442\u044c \u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u043b \u0441\u0435\u0431\u0435 \u043a\u0443\u0447\u0443 \u0440\u0430\u0431\u043e\u0442\u044b, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044f \u0432\u0445\u043e\u0434\u0438\u0442 \u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 <i>filemode<\/i> \u0432 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0439 \u043a\u043e\u0440\u0442\u0435\u0436. <b>\u0422\u0430\u043a \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u043d\u0430\u0434\u043e, \u043b\u0443\u0447\u0448\u0435 \u0443\u043f\u0440\u043e\u0449\u0430\u0442\u044c \u043f\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438<\/b>.<\/p>\n<h1>\u041d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u0430\u044f \u0432\u0441\u0442\u0440\u0435\u0447\u0430 \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439 \u21162: \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u043a\u043e\u0434.<\/h1>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f. \u0422\u043e \u0435\u0441\u0442\u044c \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043b\u043e\u0433\u0433\u0435\u0440\u0430:<\/p>\n<pre><code class=\"python\">    def message(self, message, message_type: MessageType, to_print=True, include_microseconds=False):         mt = str(message_type).replace('MessageType.', '')                                                        # \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 INFO, WARNING, etc.                                                       # \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043c \u043a \u0441\u0442\u0440\u043e\u043a\u0435 MessageType.TYPE                                                       # \u0438 \u043e\u0442\u0441\u0435\u043a\u0430\u0435\u043c \u043d\u0435\u043d\u0443\u0436\u043d\u043e\u0435         date = datetime.today().date()         if not include_microseconds:             time = datetime.today().time().replace(microsecond=0)         else:             time = datetime.today().time()         # \u0432\u044b\u0448\u0435 \u043c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f          self.__data[mt] += 1 # \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0441\u0447\u0451\u0442\u0447\u0438\u043a \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439          # \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e join         message = self.__delimiter.join([str(date), str(time), message, mt])          # \u043f\u0438\u0448\u0435\u043c \u043d\u0430\u0448\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u0443\u0431\u0438\u0440\u0430\u044f \u0431\u0430\u0439\u0442\u044b \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043e\u043a\u0440\u0430\u0448\u0435\u043d\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u043a         self.__file.write(re.sub(r'(\\x1b\\[.*?m)', '', message + '\\n')) # \u0442\u0443\u0442 \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u043c\u043e\u0434\u0443\u043b\u044c re          # \u0434\u0435\u043b\u0430\u0435\u043c \u0446\u0432\u0435\u0442\u043d\u043e\u0439 print \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0446\u0432\u0435\u0442\u043e\u043c         if to_print:             cprint(message, message_color[mt]) <\/code><\/pre>\n<p>  \u0412\u0441\u0451 \u0431\u044b \u0445\u043e\u0440\u043e\u0448\u043e, \u043d\u043e \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u044f \u0437\u0430\u0445\u043e\u0447\u0443 \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u043e\u0433 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e pandas, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440? \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 \u043f\u0435\u0440\u0432\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u043b\u043e\u0433\u0433\u0435\u0440\u0430 \u0443 \u043c\u0435\u043d\u044f \u0431\u044b\u043b \u043c\u0435\u0442\u043e\u0434 <b><i>__check_head<\/i><\/b>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043b \u0432 \u043a\u043e\u043d\u0435\u0446 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043b\u0430\u0441\u0441\u0430.<\/p>\n<pre><code class=\"python\">    def __check_head(self):         template = self.__delimiter.join(['Date', 'Time', 'Message', 'Message type\\n'])         try:             with open(self.__fp, 'r') as f: # \u0441\u0442\u0430\u0440\u044b\u0439 \u0430\u0442\u0440\u0438\u0431\u0443\u0442, \u0445\u0440\u0430\u043d\u044f\u0449\u0438\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e                 if f.readlines()[0] != template:                     self.__file.write(template)         except IndexError:             self.__file.write(template) <\/code><\/pre>\n<p>  <b>\u042d\u0442\u043e \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434<\/b>. \u042d\u0442\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u043f\u043e\u0440\u043e\u0436\u0434\u0435\u043d\u0430 \u043e\u0442 \u0441\u0430\u043c\u043e\u0439 \u043f\u0435\u0440\u0432\u043e\u0439: \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442\u044c \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e <i>filemode<\/i> \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0444\u0430\u0439\u043b\u043e\u043c. \u041f\u043e\u0447\u0435\u043c\u0443 \u043c\u0435\u0442\u043e\u0434 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a? \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0444\u0430\u0439\u043b \u043e\u0442\u043a\u0440\u044b\u0442 \u043d\u0430 \u0434\u043e\u0437\u0430\u043f\u0438\u0441\u044c (append), \u0442\u043e \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0438\u0441\u0430\u0442\u044c \u0448\u0430\u043f\u043a\u0443 \u0432\u043d\u043e\u0432\u044c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0444\u0430\u0439\u043b \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0435\u043d. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0444\u0430\u0439\u043b \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0448\u0430\u043f\u043a\u0438.<\/p>\n<p>  P.S. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0434\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u044f \u043d\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u043b \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043d\u0430 \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 <i>__fp<\/i>, \u0438 \u043a\u043b\u0430\u0441\u0441 \u0442\u0430\u043a \u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u043b \u0431\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u043f\u043b\u043e\u0445\u0438\u043c \u043a\u043e\u0434\u043e\u043c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0438 \u044d\u0442\u043e\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0440\u0430\u0431\u043e\u0447\u0438\u0439, \u0430 \u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0431\u044b\u043b \u0435\u0433\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c.<\/p>\n<p>  \u041d\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u043b\u043e\u0433\u0433\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0434\u0432\u0443\u0445 \u0440\u0435\u0436\u0438\u043c\u0430\u0445: &#8216;x&#8217; \u2014 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0444\u0430\u0439\u043b\u0430 \u0438 &#8216;w&#8217; \u2014 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439. \u042d\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u043a\u043e\u0434 \u0434\u043e \u0442\u0430\u043a\u043e\u0433\u043e \u0432\u0438\u0434\u0430:<\/p>\n<pre><code class=\"python\">    def __write_head(self):  # \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434 \u0438 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0435\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f \u043c\u0435\u0442\u043e\u0434\u0430         template = self.__delimiter.join(['Date', 'Time', 'Message', 'Message type\\n'])         self.__file.write(template) <\/code><\/pre>\n<p>  <\/p>\n<h1>\u041e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0438 \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u043c\u0435\u0441\u0442\u0430 \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439<\/h1>\n<p>  \u0421 \u043f\u0435\u0440\u0432\u044b\u043c\u0438 \u0434\u0432\u0443\u043c\u044f \u043f\u0443\u043d\u043a\u0442\u0430\u043c\u0438 \u043f\u043e\u043a\u043e\u043d\u0447\u0438\u043b\u0438, \u0434\u0430\u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441\u0432\u0435\u0440\u0445 \u043d\u0435\u0433\u043e: \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0448\u0430\u043f\u043a\u0443. \u041f\u043e\u0440\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043f\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439. \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434 <i>get_stats<\/i>:<\/p>\n<pre><code class=\"python\">    def get_stats(self):         info = str(self.__data['INFO'])         warning = str(self.__data['WARNING'])         error = str(self.__data['ERROR'])         success = str(self.__data['SUCCESS'])         # \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c int \u043f\u043e \u043a\u043b\u044e\u0447\u0430\u043c \u0438\u0437 self.__data \u0441\u043b\u043e\u0432\u0430\u0440\u044f \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043c \u0438\u0445 \u043a \u0442\u0438\u043f\u0443 str          # \u0432\u044b\u0432\u043e\u0434\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u0435, \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u0443\u044f \u0441\u0442\u0440\u043e\u043a\u0443         cprint('INFO MESSAGES COUNT: {}\\n'                'WARNING MESSAGES COUNT: {}\\n'                'ERROR MESSAGES COUNT: {}\\n'                'SUCCESS MESSAGES COUNT: {}'.format(                             colorize(info, 'magenta'), colorize(warning, 'magenta'),                             colorize(error, 'magenta'), colorize(success, 'magenta')), 'green') <\/code><\/pre>\n<p>  \u0420\u0430\u0431\u043e\u0442\u0430 \u0437\u0430\u043a\u043e\u043d\u0447\u0435\u043d\u0430, \u043d\u043e \u043c\u0435\u043d\u044f \u043d\u0435 \u043f\u043e\u043a\u0438\u0434\u0430\u043b\u043e \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0442\u0435\u043d\u0438\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u0438 \u044f \u043f\u044b\u0442\u0430\u043b\u0441\u044f \u043f\u0440\u0438\u043b\u0435\u043f\u0438\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <i>read_messages()<\/i> \u0442\u0443\u0434\u0430, \u043a\u0443\u0434\u0430 \u043d\u0435 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043b\u043e (\u043f\u0435\u0440\u0432\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f). \u0412 \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u043d\u0446\u043e\u0432, \u044f \u0441\u043e\u0437\u0434\u0430\u043b \u043d\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0437\u0432\u0430\u043b <b>LogReader<\/b>:<\/p>\n<pre><code class=\"python\">class LogReader:     def __init__(self, fp):         self.__log = open(fp)      def read_messages(self, message_type: MessageType=None):         if message_type is None:           # \u0435\u0441\u043b\u0438 \u043c\u044b \u043d\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u043b\u0438 \u043a\u0430\u043a\u043e\u0439 message type \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c           # \u0442\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043a\u0430\u0442\u044c \u0441 \u043a\u043e\u043d\u0446\u0430 \u0441\u0442\u0440\u043e\u043a\u0438 \u0442\u0438\u043f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f           # \u0430 \u043f\u043e\u0442\u043e\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0435\u0433\u043e, \u043a\u0430\u043a \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 color \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 cprint()             for line in self.__log.readlines()[1:]:                 line = line.strip()                 end = ''                 for char in line[::-1]:                     if not char.isspace():                         end += char                     else:                         end = end[::-1]                         break                 try:                     cprint(line.strip(), message_color[end])                 except KeyError:                     cprint('Key not found. Add it to message_color dict in sclogger module', 'yellow') # \u0442\u0443\u0442 \u0438\u0434\u0451\u0442 \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u0435, \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0441\u0432\u043e\u0439 \u043a\u043b\u044e\u0447 \u0432 \u0442\u0438\u043f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f       # \u043d\u043e \u043d\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u0446\u0432\u0435\u0442                     cprint(line.strip())  # \u0431\u0435\u0437 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434         else:             end = str(message_type).replace('MessageType.', '')             for line in self.__log.readlines():                 line = line.strip()                 if line.endswith(end):                     cprint(line.strip(), message_color[end]) <\/code><\/pre>\n<p>  \u0422\u0435\u0441\u0442\u0438\u0440\u0443\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u044f \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 \u0447\u0442\u0435\u043d\u0438\u044f: \u044f \u0437\u0430\u0431\u044b\u043b \u043f\u0440\u043e \u0442\u043e, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u0444\u0430\u0439\u043b \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0437\u0430\u043d\u043e\u0432\u043e, \u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043a\u0440\u044b\u0442\u044c. \u0422\u043e \u0435\u0441\u0442\u044c \u0435\u0441\u043b\u0438 \u044f \u0432 \u043e\u0434\u043d\u043e\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u0438 \u0447\u0442\u0435\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0438 \u0442\u043e\u0433\u043e \u0436\u0435 \u043b\u043e\u0433\u0430, \u0442\u043e \u0447\u0442\u0435\u043d\u0438\u0435 \u043d\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442. \u0427\u0442\u043e\u0431\u044b \u0440\u0435\u0448\u0438\u0442\u044c \u044d\u0442\u043e, \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <i>close<\/i> \u0432 \u043a\u043b\u0430\u0441\u0441 <b>Logger<\/b>:<\/p>\n<pre><code class=\"python\">    def close(self):         # \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b, \u0435\u0441\u043b\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e         self.__file.close() <\/code><\/pre>\n<p>  \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u044d\u0442\u043e \u043d\u0435 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043d\u043e \u0442\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0432\u0441\u0451 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/github.com\/Kit-Scribe\/sclogger\/blob\/master\/docs\/images\/sclogger.png?raw=true\" alt=\"image\"\/><\/p>\n<h1>\u041f\u043e\u0434\u0432\u0435\u0434\u0451\u043c \u0438\u0442\u043e\u0433\u0438.<\/h1>\n<p>  \u0412\u0441\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0442\u0430\u043a \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435 \u0431\u044b\u043b\u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c. \u0428\u0438\u0448\u043a\u0438 \u043d\u0430\u0431\u0438\u0442\u044b \u0438 \u043c\u043e\u0440\u0430\u043b\u044c \u0443\u0441\u0432\u043e\u0435\u043d\u0430. \u041d\u0443 \u0438 \u043d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u0448\u043f\u0430\u0440\u0433\u0430\u043b\u043a\u0430:<\/p>\n<p>  \u0427\u0442\u043e \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c:<\/p>\n<ul>\n<li>\u0423\u043f\u0440\u043e\u0449\u0430\u0442\u044c \u2014 \u0441\u0442\u0440\u043e\u0439\u0442\u0435 \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443, \u043f\u0438\u0448\u0438\u0442\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u043b\u0435\u0433\u043a\u043e\u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0439 \u043a\u043e\u0434.<\/li>\n<li>\u041f\u043e\u0441\u043b\u0435 \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433 <b>\u0441\u0440\u0430\u0437\u0443<\/b> \u2014 \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0439\u0442\u0435 \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u043d\u0435\u043d\u0443\u0436\u043d\u043e\u0435, \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438 \u0443\u043b\u0443\u0447\u0448\u0430\u0442\u044c \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u043a\u043e\u0434\u0430.<\/li>\n<li>\u041f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u0443\u043c\u043e\u043c \u0438 \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u2014 \u043a\u0430\u043a \u044f \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b, \u0441\u0442\u0440\u043e\u0439\u0442\u0435 \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443, \u043d\u043e \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e \u0442\u043e, \u0447\u0442\u043e \u043e\u043d\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c <b>\u043b\u043e\u0433\u0438\u0447\u043d\u043e\u0439<\/b>. \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0432\u044b \u0440\u0435\u0448\u0438\u043b\u0438, \u043a\u0430\u043a\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430, \u043d\u0435 \u043c\u0435\u043d\u044f\u0439\u0442\u0435 \u0435\u0451 \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438.<\/li>\n<li>\u0420\u0430\u0437\u0431\u0438\u0432\u0430\u0439\u0442\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u2014 \u043e\u0434\u0438\u043d \u043a\u043b\u0430\u0441\u0441 \u0438\u043b\u0438 \u043c\u043e\u0434\u0443\u043b\u044c \u043f\u043e\u0434 \u0432\u0441\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0445\u043e\u0440\u043e\u0448\u043e.<\/li>\n<li>\u0417\u0430\u0434\u0443\u043c\u044b\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u043e\u0431 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u2014 \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u0430\u0434\u0443\u043c\u044b\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u0438 \u043d\u0443\u0436\u043d\u043e \u043b\u0438, \u0447\u0442\u043e\u0431\u044b \u0432\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442 \u043c\u043e\u0433 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c\/\u0434\u0430\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0432 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u044b.<\/li>\n<\/ul>\n<p>  \u0427\u0435\u0433\u043e \u0434\u0435\u043b\u0430\u0442\u044c <b>\u043d\u0435<\/b> \u0441\u043b\u0435\u0434\u0443\u0435\u0442:<\/p>\n<ul>\n<li> \u041f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u0437\u0430\u0441\u0443\u043d\u0443\u0442\u044c \u0432\u0441\u0451 \u0432 \u043e\u0434\u0438\u043d \u043a\u043b\u0430\u0441\u0441\/\u043c\u043e\u0434\u0443\u043b\u044c \u2014 \u0435\u0441\u043b\u0438 \u0442\u0430\u043a \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0432\u0441\u0451, \u0442\u043e \u043f\u0443\u0441\u043a\u0430\u0439 \u044d\u0442\u043e \u0432\u0441\u0451 \u0431\u0443\u0434\u0435\u0442, \u043d\u043e \u043d\u0435 \u0441\u0440\u0430\u0437\u0443. \u0418\u043d\u043e\u0433\u0434\u0430 \u0445\u043e\u0440\u043e\u0448\u0438\u0435 \u0438\u0434\u0435\u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u0441\u043f\u043e\u043d\u0442\u0430\u043d\u043d\u043e.<\/li>\n<li>\u0414\u043e\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u2014 \u0441\u0442\u0430\u0440\u0430\u0439\u0442\u0435\u0441\u044c \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u0442\u044c \u043a\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432\u0430\u0448 MVP (minimum viable product).<\/li>\n<li>\u041e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0440\u0430\u0431\u043e\u0447\u0438\u0435, \u043d\u043e \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u043a\u043e\u0434\u0435 \u2014 \u0430\u043d\u0442\u043e\u043d\u0438\u043c \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0443\u043d\u043a\u0442\u0430 \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430.<\/li>\n<\/ul>\n<p>  \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435!<br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/328266\/\"> https:\/\/habrahabr.ru\/post\/328266\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u044f \u043d\u0430\u0447\u0430\u043b \u0438\u0437\u0443\u0447\u0430\u0442\u044c Python. \u041d\u0430 \u0447\u0451\u043c \u0431\u0438\u0442\u044c \u0448\u0438\u0448\u043a\u0438 \u0431\u044b\u043b\u043e \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0430 \u0434\u0435\u043b\u0430\u0442\u044c \u0443\u043f\u0440\u0430\u0436\u043d\u0435\u043d\u0438\u044f \u0440\u0430\u0434\u0438 \u0443\u043f\u0440\u0430\u0436\u043d\u0435\u043d\u0438\u0439 \u043d\u0430\u0441\u043a\u0443\u0447\u0438\u043b\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e. \u041c\u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0435 \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0441 \u044d\u043d\u0442\u0443\u0437\u0438\u0430\u0437\u043c\u043e\u043c. \u0422\u0430\u043a \u0440\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u0438\u0434\u0435\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043b\u043e\u0433\u0433\u0435\u0440 \u0441 \u0446\u0432\u0435\u0442\u043d\u044b\u043c \u0430\u0443\u0442\u043f\u0443\u0442\u043e\u043c. \u041f\u0440\u043e\u0435\u043a\u0442 \u0431\u044b\u043b \u043d\u0430\u0437\u0432\u0430\u043d \u00abSCLogger\u00bb, \u043d\u0430\u0447\u0430\u043b\u043e \u0431\u044b\u043b\u043e \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043e. \u0427\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0432 \u0438\u0442\u043e\u0433\u0435 \u0438 \u043a\u0430\u043a\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u0440\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0431\u044b\u043b\u0438 \u0434\u043e\u043f\u0443\u0449\u0435\u043d\u044b \u0434\u0430\u043b\u0435\u0435 \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-286064","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/286064","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=286064"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/286064\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=286064"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=286064"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=286064"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}