Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/284.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 如何从日志文件中删除行[DEBUG]pip.vcs:Registered vcs backend:**_Python_Django_Git_Logging - Fatal编程技术网

Python 如何从日志文件中删除行[DEBUG]pip.vcs:Registered vcs backend:**

Python 如何从日志文件中删除行[DEBUG]pip.vcs:Registered vcs backend:**,python,django,git,logging,Python,Django,Git,Logging,记录器在我的日志文件中重复这些行。这些线的含义是什么?如何删除它们 2015-12-24 15:40:02,025 [DEBUG] pip.vcs: Registered VCS backend: hg 2015-12-24 15:40:02,048 [DEBUG] pip.vcs: Registered VCS backend: svn 2015-12-24 15:40:02,049 [DEBUG] pip.vcs: Registered VCS backend: bzr 2015-12-24

记录器在我的日志文件中重复这些行。这些线的含义是什么?如何删除它们

2015-12-24 15:40:02,025 [DEBUG] pip.vcs: Registered VCS backend: hg
2015-12-24 15:40:02,048 [DEBUG] pip.vcs: Registered VCS backend: svn
2015-12-24 15:40:02,049 [DEBUG] pip.vcs: Registered VCS backend: bzr
2015-12-24 15:45:01,532 [DEBUG] pip.vcs: Registered VCS backend: git
来自


为了不看到该日志,您需要注释掉该行,或者设置不同的日志级别(非调试)。

感谢ans。但是找不到该文件:(.OS ubuntu,python 2)。7@GrvTyagi您在哪里搜索?
find/usr-name“*init*.py”2>/dev/nul | grep vcs
在这个…vim/home/ubuntu/env/lib/python2.7/site packages/pip/vcs/_uinit_uu.py的帮助中找到pip/vcs/u init_u.py,并在ubuntu中找到注释行第53行
def register(self, cls):
    if not hasattr(cls, 'name'):
        logger.warning('Cannot register VCS %s', cls.__name__)
        return
    if cls.name not in self._registry:
        self._registry[cls.name] = cls
        logger.debug('Registered VCS backend: %s', cls.name)