mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Default to log to console for docker. v4.0.168
This commit is contained in:
parent
4c087b9376
commit
55d8cb4b7b
7 changed files with 21 additions and 24 deletions
|
@ -6629,9 +6629,15 @@ string SrsConfig::get_ingest_input_url(SrsConfDirective* conf)
|
|||
return conf->arg0();
|
||||
}
|
||||
|
||||
extern bool _srs_in_docker;
|
||||
|
||||
bool SrsConfig::get_log_tank_file()
|
||||
{
|
||||
static bool DEFAULT = true;
|
||||
|
||||
if (_srs_in_docker) {
|
||||
DEFAULT = false;
|
||||
}
|
||||
|
||||
SrsConfDirective* conf = root->get("srs_log_tank");
|
||||
if (!conf || conf->arg0().empty()) {
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
|
||||
#define VERSION_MAJOR 4
|
||||
#define VERSION_MINOR 0
|
||||
#define VERSION_REVISION 167
|
||||
#define VERSION_REVISION 168
|
||||
|
||||
#endif
|
||||
|
|
|
@ -49,6 +49,7 @@ using namespace std;
|
|||
|
||||
// pre-declare
|
||||
srs_error_t run_directly_or_daemon();
|
||||
srs_error_t srs_detect_docker();
|
||||
srs_error_t run_hybrid_server();
|
||||
void show_macro_features();
|
||||
|
||||
|
@ -95,6 +96,11 @@ srs_error_t do_main(int argc, char** argv)
|
|||
#ifdef SRS_GPERF_MP
|
||||
#warning "gmp is not used for memory leak, please use gmc instead."
|
||||
#endif
|
||||
|
||||
// Ignore any error while detecting docker.
|
||||
if ((err = srs_detect_docker()) != srs_success) {
|
||||
srs_error_reset(err);
|
||||
}
|
||||
|
||||
// never use srs log(srs_trace, srs_error, etc) before config parse the option,
|
||||
// which will load the log config and apply it.
|
||||
|
@ -379,11 +385,6 @@ srs_error_t run_directly_or_daemon()
|
|||
{
|
||||
srs_error_t err = srs_success;
|
||||
|
||||
// Ignore any error while detecting docker.
|
||||
if ((err = srs_detect_docker()) != srs_success) {
|
||||
srs_error_reset(err);
|
||||
}
|
||||
|
||||
// Load daemon from config, disable it for docker.
|
||||
// @see https://github.com/ossrs/srs/issues/1594
|
||||
bool run_as_daemon = _srs_config->get_daemon();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue