We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
tests: Logs are throwing duplicated output
You can review any log (this one, for example: https://travis-ci.org/iterative/dvc/jobs/457244685#L1544-L1571)

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `dvc/logger.py`
Content:
```
1 import sys
2 import logging
3 import colorama
4 import traceback
5 import re
6 
7 
8 colorama.init()
9 
10 
11 def visual_width(line):
12     """ Get the the number of columns required to display a string """
13 
14     return len(re.sub(colorama.ansitowin32.AnsiToWin32.ANSI_CSI_RE, '', line))
15 
16 
17 def visual_center(line, width):
18     """ Center align string according to it's visual width """
19 
20     spaces = max(width - visual_width(line), 0)
21     left_padding = int(spaces / 2)
22     right_padding = (spaces - left_padding)
23 
24     return (left_padding * ' ') + line + (right_padding * ' ')
25 
26 
27 class Logger(object):
28     FMT = '%(message)s'
29     DEFAULT_LEVEL = logging.INFO
30 
31     LEVEL_MAP = {
32         'debug': logging.DEBUG,
33         'info': logging.INFO,
34         'warn': logging.WARNING,
35         'error': logging.ERROR
36     }
37 
38     COLOR_MAP = {
39         'green': colorama.Fore.GREEN,
40         'yellow': colorama.Fore.YELLOW,
41         'blue': colorama.Fore.BLUE,
42         'red': colorama.Fore.RED,
43     }
44 
45     LEVEL_COLOR_MAP = {
46         'debug': 'blue',
47         'warn': 'yellow',
48         'error': 'red',
49     }
50 
51     def __init__(self, loglevel=None):
52         if loglevel:
53             Logger.set_level(loglevel)
54 
55     @staticmethod
56     def init():
57 
58         class LogLevelFilter(logging.Filter):
59             def filter(self, record):
60                 return record.levelno <= logging.WARNING
61 
62         sh_out = logging.StreamHandler(sys.stdout)
63         sh_out.setFormatter(logging.Formatter(Logger.FMT))
64         sh_out.setLevel(logging.DEBUG)
65         sh_out.addFilter(LogLevelFilter())
66 
67         sh_err = logging.StreamHandler(sys.stderr)
68         sh_err.setFormatter(logging.Formatter(Logger.FMT))
69         sh_err.setLevel(logging.ERROR)
70 
71         Logger.logger().addHandler(sh_out)
72         Logger.logger().addHandler(sh_err)
73         Logger.set_level()
74 
75     @staticmethod
76     def logger():
77         return logging.getLogger('dvc')
78 
79     @staticmethod
80     def set_level(level=None):
81         if not level:
82             lvl = Logger.DEFAULT_LEVEL
83         else:
84             lvl = Logger.LEVEL_MAP.get(level.lower(), Logger.DEFAULT_LEVEL)
85         Logger.logger().setLevel(lvl)
86 
87     @staticmethod
88     def be_quiet():
89         Logger.logger().setLevel(logging.CRITICAL)
90 
91     @staticmethod
92     def be_verbose():
93         Logger.logger().setLevel(logging.DEBUG)
94 
95     @staticmethod
96     def colorize(msg, color):
97         header = ''
98         footer = ''
99 
100         if sys.stdout.isatty():  # pragma: no cover
101             header = Logger.COLOR_MAP.get(color.lower(), '')
102             footer = colorama.Style.RESET_ALL
103 
104         return u'{}{}{}'.format(header, msg, footer)
105 
106     @staticmethod
107     def parse_exc(exc, tb=None):
108         str_tb = tb if tb else None
109         str_exc = str(exc) if exc else ""
110         l_str_exc = []
111 
112         if len(str_exc) != 0:
113             l_str_exc.append(str_exc)
114 
115         if exc and hasattr(exc, 'cause') and exc.cause:
116             cause_tb = exc.cause_tb if hasattr(exc, 'cause_tb') else None
117             l_cause_str_exc, cause_str_tb = Logger.parse_exc(exc.cause,
118                                                              cause_tb)
119 
120             str_tb = cause_str_tb
121             l_str_exc += l_cause_str_exc
122 
123         return (l_str_exc, str_tb)
124 
125     @staticmethod
126     def _prefix(msg, typ):
127         color = Logger.LEVEL_COLOR_MAP.get(typ.lower(), '')
128         return Logger.colorize('{}'.format(msg), color)
129 
130     @staticmethod
131     def error_prefix():
132         return Logger._prefix('Error', 'error')
133 
134     @staticmethod
135     def warning_prefix():
136         return Logger._prefix('Warning', 'warn')
137 
138     @staticmethod
139     def debug_prefix():
140         return Logger._prefix('Debug', 'debug')
141 
142     @staticmethod
143     def _with_progress(func, msg):
144         from dvc.progress import progress
145         with progress:
146             func(msg)
147 
148     @staticmethod
149     def _with_exc(func, prefix, msg, suffix="", exc=None):
150         l_str_exc, str_tb = Logger.parse_exc(exc)
151 
152         if exc is not None and Logger.is_verbose():
153             str_tb = str_tb if str_tb else traceback.format_exc()
154             Logger._with_progress(Logger.logger().error, str_tb)
155 
156         l_msg = [prefix]
157         if msg is not None and len(msg) != 0:
158             l_msg.append(msg)
159         l_msg += l_str_exc
160 
161         Logger._with_progress(func, ': '.join(l_msg) + suffix)
162 
163     @staticmethod
164     def error(msg, exc=None):
165         chat = "\n\nHaving any troubles? Hit us up at dvc.org/support, " \
166                "we are always happy to help!"
167         Logger._with_exc(Logger.logger().error,
168                          Logger.error_prefix(),
169                          msg,
170                          suffix=chat,
171                          exc=exc)
172 
173     @classmethod
174     def warn(cls, msg, exc=None):
175         cls._with_exc(cls.logger().warning,
176                       cls.warning_prefix(),
177                       msg,
178                       exc=exc)
179 
180     @classmethod
181     def debug(cls, msg, exc=None):
182         cls._with_exc(cls.logger().debug,
183                       cls.debug_prefix(),
184                       msg,
185                       exc=exc)
186 
187     @staticmethod
188     def info(msg):
189         Logger._with_progress(Logger.logger().info, msg)
190 
191     @staticmethod
192     def is_quiet():
193         return Logger.logger().level == logging.CRITICAL
194 
195     @staticmethod
196     def is_verbose():
197         return Logger.logger().getEffectiveLevel() == logging.DEBUG
198 
199     @classmethod
200     def box(cls, msg, border_color=''):
201         if cls.is_quiet():
202             return
203 
204         lines = msg.split('\n')
205         max_width = max(visual_width(line) for line in lines)
206 
207         padding_horizontal = 5
208         padding_vertical = 1
209 
210         box_size_horizontal = (max_width + (padding_horizontal * 2))
211 
212         chars = {
213             'corner':     '+',
214             'horizontal': '-',
215             'vertical':   '|',
216             'empty':      ' ',
217         }
218 
219         margin = "{corner}{line}{corner}\n".format(
220             corner=chars['corner'],
221             line=chars['horizontal'] * box_size_horizontal,
222         )
223 
224         padding_lines = [
225             "{border}{space}{border}\n".format(
226                 border=cls.colorize(chars['vertical'], border_color),
227                 space=chars['empty'] * box_size_horizontal,
228             ) * padding_vertical
229         ]
230 
231         content_lines = [
232             "{border}{space}{content}{space}{border}\n".format(
233                 border=cls.colorize(chars['vertical'], border_color),
234                 space=chars['empty'] * padding_horizontal,
235                 content=visual_center(line, max_width),
236             ) for line in lines
237         ]
238 
239         box = "{margin}{padding}{content}{padding}{margin}".format(
240                 margin=cls.colorize(margin, border_color),
241                 padding=''.join(padding_lines),
242                 content=''.join(content_lines),
243             )
244 
245         print(box)
246
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/dvc/logger.py b/dvc/logger.py
--- a/dvc/logger.py
+++ b/dvc/logger.py
@@ -59,6 +59,9 @@
             def filter(self, record):
                 return record.levelno <= logging.WARNING
 
+        if Logger._already_initialized():
+            return
+
         sh_out = logging.StreamHandler(sys.stdout)
         sh_out.setFormatter(logging.Formatter(Logger.FMT))
         sh_out.setLevel(logging.DEBUG)
@@ -243,3 +246,7 @@
             )
 
         print(box)
+
+    @staticmethod
+    def _already_initialized():
+        return bool(Logger.logger().handlers)

{"golden_diff": "diff --git a/dvc/logger.py b/dvc/logger.py\n--- a/dvc/logger.py\n+++ b/dvc/logger.py\n@@ -59,6 +59,9 @@\n             def filter(self, record):\n                 return record.levelno <= logging.WARNING\n \n+        if Logger._already_initialized():\n+            return\n+\n         sh_out = logging.StreamHandler(sys.stdout)\n         sh_out.setFormatter(logging.Formatter(Logger.FMT))\n         sh_out.setLevel(logging.DEBUG)\n@@ -243,3 +246,7 @@\n             )\n \n         print(box)\n+\n+    @staticmethod\n+    def _already_initialized():\n+        return bool(Logger.logger().handlers)\n", "issue": "tests: Logs are throwing duplicated output\nYou can review any log (this one, for example: https://travis-ci.org/iterative/dvc/jobs/457244685#L1544-L1571)\n", "before_files": [{"content": "import sys\nimport logging\nimport colorama\nimport traceback\nimport re\n\n\ncolorama.init()\n\n\ndef visual_width(line):\n    \"\"\" Get the the number of columns required to display a string \"\"\"\n\n    return len(re.sub(colorama.ansitowin32.AnsiToWin32.ANSI_CSI_RE, '', line))\n\n\ndef visual_center(line, width):\n    \"\"\" Center align string according to it's visual width \"\"\"\n\n    spaces = max(width - visual_width(line), 0)\n    left_padding = int(spaces / 2)\n    right_padding = (spaces - left_padding)\n\n    return (left_padding * ' ') + line + (right_padding * ' ')\n\n\nclass Logger(object):\n    FMT = '%(message)s'\n    DEFAULT_LEVEL = logging.INFO\n\n    LEVEL_MAP = {\n        'debug': logging.DEBUG,\n        'info': logging.INFO,\n        'warn': logging.WARNING,\n        'error': logging.ERROR\n    }\n\n    COLOR_MAP = {\n        'green': colorama.Fore.GREEN,\n        'yellow': colorama.Fore.YELLOW,\n        'blue': colorama.Fore.BLUE,\n        'red': colorama.Fore.RED,\n    }\n\n    LEVEL_COLOR_MAP = {\n        'debug': 'blue',\n        'warn': 'yellow',\n        'error': 'red',\n    }\n\n    def __init__(self, loglevel=None):\n        if loglevel:\n            Logger.set_level(loglevel)\n\n    @staticmethod\n    def init():\n\n        class LogLevelFilter(logging.Filter):\n            def filter(self, record):\n                return record.levelno <= logging.WARNING\n\n        sh_out = logging.StreamHandler(sys.stdout)\n        sh_out.setFormatter(logging.Formatter(Logger.FMT))\n        sh_out.setLevel(logging.DEBUG)\n        sh_out.addFilter(LogLevelFilter())\n\n        sh_err = logging.StreamHandler(sys.stderr)\n        sh_err.setFormatter(logging.Formatter(Logger.FMT))\n        sh_err.setLevel(logging.ERROR)\n\n        Logger.logger().addHandler(sh_out)\n        Logger.logger().addHandler(sh_err)\n        Logger.set_level()\n\n    @staticmethod\n    def logger():\n        return logging.getLogger('dvc')\n\n    @staticmethod\n    def set_level(level=None):\n        if not level:\n            lvl = Logger.DEFAULT_LEVEL\n        else:\n            lvl = Logger.LEVEL_MAP.get(level.lower(), Logger.DEFAULT_LEVEL)\n        Logger.logger().setLevel(lvl)\n\n    @staticmethod\n    def be_quiet():\n        Logger.logger().setLevel(logging.CRITICAL)\n\n    @staticmethod\n    def be_verbose():\n        Logger.logger().setLevel(logging.DEBUG)\n\n    @staticmethod\n    def colorize(msg, color):\n        header = ''\n        footer = ''\n\n        if sys.stdout.isatty():  # pragma: no cover\n            header = Logger.COLOR_MAP.get(color.lower(), '')\n            footer = colorama.Style.RESET_ALL\n\n        return u'{}{}{}'.format(header, msg, footer)\n\n    @staticmethod\n    def parse_exc(exc, tb=None):\n        str_tb = tb if tb else None\n        str_exc = str(exc) if exc else \"\"\n        l_str_exc = []\n\n        if len(str_exc) != 0:\n            l_str_exc.append(str_exc)\n\n        if exc and hasattr(exc, 'cause') and exc.cause:\n            cause_tb = exc.cause_tb if hasattr(exc, 'cause_tb') else None\n            l_cause_str_exc, cause_str_tb = Logger.parse_exc(exc.cause,\n                                                             cause_tb)\n\n            str_tb = cause_str_tb\n            l_str_exc += l_cause_str_exc\n\n        return (l_str_exc, str_tb)\n\n    @staticmethod\n    def _prefix(msg, typ):\n        color = Logger.LEVEL_COLOR_MAP.get(typ.lower(), '')\n        return Logger.colorize('{}'.format(msg), color)\n\n    @staticmethod\n    def error_prefix():\n        return Logger._prefix('Error', 'error')\n\n    @staticmethod\n    def warning_prefix():\n        return Logger._prefix('Warning', 'warn')\n\n    @staticmethod\n    def debug_prefix():\n        return Logger._prefix('Debug', 'debug')\n\n    @staticmethod\n    def _with_progress(func, msg):\n        from dvc.progress import progress\n        with progress:\n            func(msg)\n\n    @staticmethod\n    def _with_exc(func, prefix, msg, suffix=\"\", exc=None):\n        l_str_exc, str_tb = Logger.parse_exc(exc)\n\n        if exc is not None and Logger.is_verbose():\n            str_tb = str_tb if str_tb else traceback.format_exc()\n            Logger._with_progress(Logger.logger().error, str_tb)\n\n        l_msg = [prefix]\n        if msg is not None and len(msg) != 0:\n            l_msg.append(msg)\n        l_msg += l_str_exc\n\n        Logger._with_progress(func, ': '.join(l_msg) + suffix)\n\n    @staticmethod\n    def error(msg, exc=None):\n        chat = \"\\n\\nHaving any troubles? Hit us up at dvc.org/support, \" \\\n               \"we are always happy to help!\"\n        Logger._with_exc(Logger.logger().error,\n                         Logger.error_prefix(),\n                         msg,\n                         suffix=chat,\n                         exc=exc)\n\n    @classmethod\n    def warn(cls, msg, exc=None):\n        cls._with_exc(cls.logger().warning,\n                      cls.warning_prefix(),\n                      msg,\n                      exc=exc)\n\n    @classmethod\n    def debug(cls, msg, exc=None):\n        cls._with_exc(cls.logger().debug,\n                      cls.debug_prefix(),\n                      msg,\n                      exc=exc)\n\n    @staticmethod\n    def info(msg):\n        Logger._with_progress(Logger.logger().info, msg)\n\n    @staticmethod\n    def is_quiet():\n        return Logger.logger().level == logging.CRITICAL\n\n    @staticmethod\n    def is_verbose():\n        return Logger.logger().getEffectiveLevel() == logging.DEBUG\n\n    @classmethod\n    def box(cls, msg, border_color=''):\n        if cls.is_quiet():\n            return\n\n        lines = msg.split('\\n')\n        max_width = max(visual_width(line) for line in lines)\n\n        padding_horizontal = 5\n        padding_vertical = 1\n\n        box_size_horizontal = (max_width + (padding_horizontal * 2))\n\n        chars = {\n            'corner':     '+',\n            'horizontal': '-',\n            'vertical':   '|',\n            'empty':      ' ',\n        }\n\n        margin = \"{corner}{line}{corner}\\n\".format(\n            corner=chars['corner'],\n            line=chars['horizontal'] * box_size_horizontal,\n        )\n\n        padding_lines = [\n            \"{border}{space}{border}\\n\".format(\n                border=cls.colorize(chars['vertical'], border_color),\n                space=chars['empty'] * box_size_horizontal,\n            ) * padding_vertical\n        ]\n\n        content_lines = [\n            \"{border}{space}{content}{space}{border}\\n\".format(\n                border=cls.colorize(chars['vertical'], border_color),\n                space=chars['empty'] * padding_horizontal,\n                content=visual_center(line, max_width),\n            ) for line in lines\n        ]\n\n        box = \"{margin}{padding}{content}{padding}{margin}\".format(\n                margin=cls.colorize(margin, border_color),\n                padding=''.join(padding_lines),\n                content=''.join(content_lines),\n            )\n\n        print(box)\n", "path": "dvc/logger.py"}], "after_files": [{"content": "import sys\nimport logging\nimport colorama\nimport traceback\nimport re\n\n\ncolorama.init()\n\n\ndef visual_width(line):\n    \"\"\" Get the the number of columns required to display a string \"\"\"\n\n    return len(re.sub(colorama.ansitowin32.AnsiToWin32.ANSI_CSI_RE, '', line))\n\n\ndef visual_center(line, width):\n    \"\"\" Center align string according to it's visual width \"\"\"\n\n    spaces = max(width - visual_width(line), 0)\n    left_padding = int(spaces / 2)\n    right_padding = (spaces - left_padding)\n\n    return (left_padding * ' ') + line + (right_padding * ' ')\n\n\nclass Logger(object):\n    FMT = '%(message)s'\n    DEFAULT_LEVEL = logging.INFO\n\n    LEVEL_MAP = {\n        'debug': logging.DEBUG,\n        'info': logging.INFO,\n        'warn': logging.WARNING,\n        'error': logging.ERROR\n    }\n\n    COLOR_MAP = {\n        'green': colorama.Fore.GREEN,\n        'yellow': colorama.Fore.YELLOW,\n        'blue': colorama.Fore.BLUE,\n        'red': colorama.Fore.RED,\n    }\n\n    LEVEL_COLOR_MAP = {\n        'debug': 'blue',\n        'warn': 'yellow',\n        'error': 'red',\n    }\n\n    def __init__(self, loglevel=None):\n        if loglevel:\n            Logger.set_level(loglevel)\n\n    @staticmethod\n    def init():\n\n        class LogLevelFilter(logging.Filter):\n            def filter(self, record):\n                return record.levelno <= logging.WARNING\n\n        if Logger._already_initialized():\n            return\n\n        sh_out = logging.StreamHandler(sys.stdout)\n        sh_out.setFormatter(logging.Formatter(Logger.FMT))\n        sh_out.setLevel(logging.DEBUG)\n        sh_out.addFilter(LogLevelFilter())\n\n        sh_err = logging.StreamHandler(sys.stderr)\n        sh_err.setFormatter(logging.Formatter(Logger.FMT))\n        sh_err.setLevel(logging.ERROR)\n\n        Logger.logger().addHandler(sh_out)\n        Logger.logger().addHandler(sh_err)\n        Logger.set_level()\n\n    @staticmethod\n    def logger():\n        return logging.getLogger('dvc')\n\n    @staticmethod\n    def set_level(level=None):\n        if not level:\n            lvl = Logger.DEFAULT_LEVEL\n        else:\n            lvl = Logger.LEVEL_MAP.get(level.lower(), Logger.DEFAULT_LEVEL)\n        Logger.logger().setLevel(lvl)\n\n    @staticmethod\n    def be_quiet():\n        Logger.logger().setLevel(logging.CRITICAL)\n\n    @staticmethod\n    def be_verbose():\n        Logger.logger().setLevel(logging.DEBUG)\n\n    @staticmethod\n    def colorize(msg, color):\n        header = ''\n        footer = ''\n\n        if sys.stdout.isatty():  # pragma: no cover\n            header = Logger.COLOR_MAP.get(color.lower(), '')\n            footer = colorama.Style.RESET_ALL\n\n        return u'{}{}{}'.format(header, msg, footer)\n\n    @staticmethod\n    def parse_exc(exc, tb=None):\n        str_tb = tb if tb else None\n        str_exc = str(exc) if exc else \"\"\n        l_str_exc = []\n\n        if len(str_exc) != 0:\n            l_str_exc.append(str_exc)\n\n        if exc and hasattr(exc, 'cause') and exc.cause:\n            cause_tb = exc.cause_tb if hasattr(exc, 'cause_tb') else None\n            l_cause_str_exc, cause_str_tb = Logger.parse_exc(exc.cause,\n                                                             cause_tb)\n\n            str_tb = cause_str_tb\n            l_str_exc += l_cause_str_exc\n\n        return (l_str_exc, str_tb)\n\n    @staticmethod\n    def _prefix(msg, typ):\n        color = Logger.LEVEL_COLOR_MAP.get(typ.lower(), '')\n        return Logger.colorize('{}'.format(msg), color)\n\n    @staticmethod\n    def error_prefix():\n        return Logger._prefix('Error', 'error')\n\n    @staticmethod\n    def warning_prefix():\n        return Logger._prefix('Warning', 'warn')\n\n    @staticmethod\n    def debug_prefix():\n        return Logger._prefix('Debug', 'debug')\n\n    @staticmethod\n    def _with_progress(func, msg):\n        from dvc.progress import progress\n        with progress:\n            func(msg)\n\n    @staticmethod\n    def _with_exc(func, prefix, msg, suffix=\"\", exc=None):\n        l_str_exc, str_tb = Logger.parse_exc(exc)\n\n        if exc is not None and Logger.is_verbose():\n            str_tb = str_tb if str_tb else traceback.format_exc()\n            Logger._with_progress(Logger.logger().error, str_tb)\n\n        l_msg = [prefix]\n        if msg is not None and len(msg) != 0:\n            l_msg.append(msg)\n        l_msg += l_str_exc\n\n        Logger._with_progress(func, ': '.join(l_msg) + suffix)\n\n    @staticmethod\n    def error(msg, exc=None):\n        chat = \"\\n\\nHaving any troubles? Hit us up at dvc.org/support, \" \\\n               \"we are always happy to help!\"\n        Logger._with_exc(Logger.logger().error,\n                         Logger.error_prefix(),\n                         msg,\n                         suffix=chat,\n                         exc=exc)\n\n    @classmethod\n    def warn(cls, msg, exc=None):\n        cls._with_exc(cls.logger().warning,\n                      cls.warning_prefix(),\n                      msg,\n                      exc=exc)\n\n    @classmethod\n    def debug(cls, msg, exc=None):\n        cls._with_exc(cls.logger().debug,\n                      cls.debug_prefix(),\n                      msg,\n                      exc=exc)\n\n    @staticmethod\n    def info(msg):\n        Logger._with_progress(Logger.logger().info, msg)\n\n    @staticmethod\n    def is_quiet():\n        return Logger.logger().level == logging.CRITICAL\n\n    @staticmethod\n    def is_verbose():\n        return Logger.logger().getEffectiveLevel() == logging.DEBUG\n\n    @classmethod\n    def box(cls, msg, border_color=''):\n        if cls.is_quiet():\n            return\n\n        lines = msg.split('\\n')\n        max_width = max(visual_width(line) for line in lines)\n\n        padding_horizontal = 5\n        padding_vertical = 1\n\n        box_size_horizontal = (max_width + (padding_horizontal * 2))\n\n        chars = {\n            'corner':     '+',\n            'horizontal': '-',\n            'vertical':   '|',\n            'empty':      ' ',\n        }\n\n        margin = \"{corner}{line}{corner}\\n\".format(\n            corner=chars['corner'],\n            line=chars['horizontal'] * box_size_horizontal,\n        )\n\n        padding_lines = [\n            \"{border}{space}{border}\\n\".format(\n                border=cls.colorize(chars['vertical'], border_color),\n                space=chars['empty'] * box_size_horizontal,\n            ) * padding_vertical\n        ]\n\n        content_lines = [\n            \"{border}{space}{content}{space}{border}\\n\".format(\n                border=cls.colorize(chars['vertical'], border_color),\n                space=chars['empty'] * padding_horizontal,\n                content=visual_center(line, max_width),\n            ) for line in lines\n        ]\n\n        box = \"{margin}{padding}{content}{padding}{margin}\".format(\n                margin=cls.colorize(margin, border_color),\n                padding=''.join(padding_lines),\n                content=''.join(content_lines),\n            )\n\n        print(box)\n\n    @staticmethod\n    def _already_initialized():\n        return bool(Logger.logger().handlers)\n", "path": "dvc/logger.py"}]}