Skip to content

Commit

Permalink
Log: Refine the tail help log, show last 30 lines
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Aug 31, 2021
1 parent b6d0c73 commit cf31292
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions trunk/src/app/srs_app_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ using namespace srs_internal;
// @global the version to identify the core.
const char* _srs_version = "XCORE-" RTMP_SIG_SRS_SERVER;

#define SRS_WIKI_URL_LOG "https://github.com/ossrs/srs/wiki/v1_CN_SrsLog"

// when user config an invalid value, macros to perfer true or false.
#define SRS_CONF_PERFER_FALSE(conf_arg) conf_arg == "on"
#define SRS_CONF_PERFER_TRUE(conf_arg) conf_arg != "off"
Expand Down Expand Up @@ -2009,7 +2007,7 @@ srs_error_t SrsConfig::parse_options(int argc, char** argv)
return srs_error_new(ERROR_SYSTEM_CONFIG_INVALID, "no log file");
}
if (get_log_tank_file()) {
srs_trace("you can check log by: tail -f %s (@see %s)", log_filename.c_str(), SRS_WIKI_URL_LOG);
srs_trace("you can check log by: tail -n 30 -f %s", log_filename.c_str());
srs_trace("please check SRS by: ./etc/init.d/srs status");
} else {
srs_trace("write log to console");
Expand Down Expand Up @@ -3773,7 +3771,7 @@ srs_error_t SrsConfig::check_normal_config()
return srs_error_new(ERROR_SYSTEM_CONFIG_INVALID, "log file is empty");
}
if (get_log_tank_file()) {
srs_trace("you can check log by: tail -f %s (@see %s)", log_filename.c_str(), SRS_WIKI_URL_LOG);
srs_trace("you can check log by: tail -n 30 -f %s", log_filename.c_str());
srs_trace("please check SRS by: ./etc/init.d/srs status");
} else {
srs_trace("write log to console");
Expand Down

0 comments on commit cf31292

Please sign in to comment.