我想把记录语句的行号涂上颜色。据我所知,我必须为此编写一个完整的新代码[1]。有没有更短的方法让下面的线条变彩色?i、 e更改%(lineno)d'
部分,使终端在行号中具有颜色。谢谢。你知道吗
logging.basicConfig(level=logging.DEBUG,
format='%(name)-12s %(funcName)s() %(message)s %(lineno)d')
logger = logging.getLogger(__name__)
[1]Python Colorlog not printing in the log files with colors
目前没有回答
相关问题 更多 >
编程相关推荐