Use LogFile=<stdiut> instead of LogFile=- to redirect log to stdout

This commit is contained in:
Alexander Pevzner 2022-11-03 14:44:58 +03:00
parent 59ca0e1c58
commit d6e888cf38
2 changed files with 3 additions and 3 deletions

View File

@ -62,7 +62,7 @@ internal_log_file_open(const char *fname)
if (fname != NULL)
{
if (g_strcmp(fname, "-") != 0)
if (g_strcmp(fname, "<stdout>") != 0)
{
ret = open(fname, O_WRONLY | O_CREAT | O_APPEND | O_SYNC,
S_IRUSR | S_IWUSR);
@ -329,7 +329,7 @@ internal_config_read_logging(int file,
if (lc->log_file != NULL)
{
if (lc->log_file[0] != '/' && g_strcmp(lc->log_file, "-") != 0)
if (lc->log_file[0] != '/' && g_strcmp(lc->log_file, "<stdout>") != 0)
{
temp_buf = (char *)g_malloc(512, 0);
g_snprintf(temp_buf, 511, "%s/%s", XRDP_LOG_PATH, lc->log_file);

View File

@ -230,7 +230,7 @@ The following parameters can be used in the \fB[Logging]\fR section:
.TP
\fBLogFile\fR=\fI@localstatedir@/log/xrdp.log\fR
This options contains the path to logfile. It can be either absolute or relative. If set to "-", log will go to stdout, which is useful for debugging\fR
This options contains the path to logfile. It can be either absolute or relative. If set to \fB<stdout>\fR, log will go to stdout, which is useful for debugging\fR
.TP
\fBLogLevel\fR=\fIlevel\fR