Skip to content

Commit

Permalink
Changing config file logging section name to follow the naming
Browse files Browse the repository at this point in the history
convention
  • Loading branch information
aquesnel committed Oct 19, 2020
1 parent 04dff6a commit 65347e4
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions common/log.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ enum logReturns
};

#define SESMAN_CFG_LOGGING "Logging"
#define SESMAN_CFG_LOGGING_LOGGER "Logging_PerLogger"
#define SESMAN_CFG_LOGGING_LOGGER "LoggingPerLogger"
#define SESMAN_CFG_LOG_FILE "LogFile"
#define SESMAN_CFG_LOG_LEVEL "LogLevel"
#define SESMAN_CFG_LOG_ENABLE_CONSOLE "EnableConsole"
Expand All @@ -77,12 +77,12 @@ enum logReturns
*
* Note: when the build is configured with --enable-xrdpdebug, then
* the log level can be configured per the source file name or method name
* (with the suffix "()") in the [Logging_PerLogger]
* (with the suffix "()") in the [LoggingPerLogger]
* section of the configuration file.
*
* For example:
* ```
* [Logging_PerLogger]
* [LoggingPerLogger]
* xrdp.c=DEBUG
* main()=WARNING
* ```
Expand Down
4 changes: 2 additions & 2 deletions docs/man/sesman.ini.5.in
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ relative path to \fI@xrdpconfdir@\fR. If not specified, defaults to
\fI@xrdpconfdir@/reconnectwm.sh\fR.

.SH "LOGGING"
Following parameters can be used in the \fB[Logging]\fR and \fB[Chansrv_Logging]\fR
Following parameters can be used in the \fB[Logging]\fR and \fB[ChansrvLogging]\fR
sections.

.TP
\fBLogFile\fR=\fIfilename\fR
Log file path. It can be either absolute or relative. If not specified,
defaults to \fI./sesman.log\fR It is ignored in the [Chansrv_Logging] section
defaults to \fI./sesman.log\fR It is ignored in the [ChansrvLogging] section
since the channel server creates one log file per display and instead uses the
following log file naming convention \fIxrdp-chansrv.${DISPLAY}.log\fR

Expand Down
2 changes: 1 addition & 1 deletion sesman/chansrv/chansrv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1768,7 +1768,7 @@ main(int argc, char **argv)
g_file_delete(log_file);
}

logconfig = log_config_init_from_config(config_path, "xrdp-chansrv", "Chansrv_");
logconfig = log_config_init_from_config(config_path, "xrdp-chansrv", "Chansrv");
if (logconfig->log_file != NULL)
{
g_free(logconfig->log_file);
Expand Down
6 changes: 3 additions & 3 deletions sesman/sesman.ini.in
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ EnableSyslog=true
#ConsoleLevel=INFO
#EnableProcessId=false

[Logging_PerLogger]
[LoggingPerLogger]
; Note: per logger configuration is only used in XRDP_DEBUG builds of XRDP.
#sesman.c=INFO
#main()=INFO
Expand Down Expand Up @@ -120,7 +120,7 @@ FuseMountName=thinclient_drives
; Make this more permissive (e.g. 022) if required.
FileUmask=077

[Chansrv_Logging]
[ChansrvLogging]
; Note: one log file is created per display and the LogFile config value
; is ignored. The channel server log file names follow the naming convention:
; xrdp-chansrv.${DISPLAY}.log
Expand All @@ -133,7 +133,7 @@ EnableSyslog=true
#ConsoleLevel=INFO
#EnableProcessId=false

[Chansrv_Logging_PerLogger]
[ChansrvLoggingPerLogger]
; Note: per logger configuration is only used in XRDP_DEBUG builds of XRDP.
#chansrv.c=INFO
#main()=INFO
Expand Down
2 changes: 1 addition & 1 deletion xrdp/xrdp.ini.in
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ EnableSyslog=true
#ConsoleLevel=INFO
#EnableProcessId=false

[Logging_PerLogger]
[LoggingPerLogger]
; Note: per logger configuration is only used in XRDP_DEBUG builds of XRDP.
#xrdp.c=INFO
#main()=INFO
Expand Down
2 changes: 1 addition & 1 deletion xrdp/xrdp_login_wnd.c
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ xrdp_wm_login_fill_in_combo(struct xrdp_wm *self, struct xrdp_bitmap *b)
if ((g_strncasecmp(p, "globals", 255) == 0)
|| (g_strncasecmp(p, "channels", 255) == 0)
|| (g_strncasecmp(p, "Logging", 255) == 0)
|| (g_strncasecmp(p, "Logging_PerLogger", 255) == 0))
|| (g_strncasecmp(p, "LoggingPerLogger", 255) == 0))
{
}
else
Expand Down
2 changes: 1 addition & 1 deletion xrdp/xrdp_wm.c
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ xrdp_wm_init(struct xrdp_wm *self)
q = (char *)list_get_item(names, index);
if ((g_strncasecmp("globals", q, 8) != 0) &&
(g_strncasecmp("Logging", q, 8) != 0) &&
(g_strncasecmp("Logging_PerLogger", q, 18) != 0) &&
(g_strncasecmp("LoggingPerLogger", q, 17) != 0) &&
(g_strncasecmp("channels", q, 9) != 0))
{
g_strncpy(default_section_name, q, 255);
Expand Down

0 comments on commit 65347e4

Please sign in to comment.