提交 21b412dd 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!196 add the description for log rotate

Merge pull request !196 from 治愈系潇洒哥/master
......@@ -229,6 +229,8 @@ MindSpore uses glog to output logs. The following environment variables are comm
3. GLOG_log_dir=YourPath specifies the log output path. If GLOG_logtostderr is set to 0, value of this variable must be specified. If GLOG_log_dir is specified and the value of GLOG_logtostderr is 1, logs are output to the screen but not to a file. Logs of C++ and Python will be output to different files. The file name of C++ log complies with the naming rule of GLOG log file. Here, the name is `mindspore.MachineName.UserName.log.LogLevel.Timestamp`. The file name of Python log is `mindspore.log`.
4. MS_SUBMODULE_LOG_v="{SubModule1:LogLevel1,SubModule2:LogLevel2,...}" specifies log levels of C++ sub modules of MindSpore. The specified sub module log level will overwrite the global log level. The meaning of submodule log level is same as GLOG_v, the sub modules of MindSpore grouped by source directory is as the bellow table. E.g. when set `GLOG_v=1 MS_SUBMODULE_LOG_v="{PARSER:2,ANALYZER:2}"` then log levels of `PARSER` and `ANALYZER` are WARNING, other modules' log levels are INFO.
> The glog does not support to rotate the log files. If you need to control the disk space usage for log files, you can use the log file management tools provided by the operating system, such as Linux logrotate.
Sub moudles of MindSpore grouped by source directory:
| Source Files | Sub Module Name |
......
......@@ -228,6 +228,8 @@ MindSpore采用glog来输出日志,常用的几个环境变量如下:
3. GLOG_log_dir=YourPath 指定日志输出的路径。若GLOG_logtostderr的值为0,则必须设置此变量。若指定了GLOG_log_dir且GLOG_logtostderr的值为1时,则日志输出到屏幕,不输出到文件。C++和Python的日志会被输出到不同的文件中,C++日志的文件名遵从GLOG日志文件的命名规则,这里是`mindspore.机器名.用户名.log.日志级别.时间戳`,Python日志的文件名为`mindspore.log`
4. MS_SUBMODULE_LOG_v="{SubModule1:LogLevel1,SubModule2:LogLevel2,...}" 指定MindSpore C++各子模块的日志级别,被指定的子模块的日志级别将覆盖GLOG_v在此模块内的设置,此处子模块的日志级别LogLevel与GLOG_v的日志级别含义相同,MindSpore子模块的划分如下表。如可以通过`GLOG_v=1 MS_SUBMODULE_LOG_v="{PARSER:2,ANALYZER:2}"``PARSER``ANALYZER`模块的日志级别设为WARNING,其他模块的日志级别设为INFO。
> glog不支持日志文件的绕接,如果需要控制日志文件对磁盘空间的占用,可选用操作系统提供的日志文件管理工具,例如:Linux的logrotate。
MindSpore子模块按照目录划分如下:
| Source Files | Sub Module Name |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册