On Windows, ns_log output is garbled. Below is some of the output from running "nsd.exe -f" in a Windows Command Prompt window.
The 4th printed field, immediately after the severity, always has some garbled junk, which is then followed by readable text. This happens regardless of what NaviServer config file I use, including the simple-config.tcl that ships with NaviSever. This never happened with old c. 2014 versions of NaviServer on Windows. Btw, the log output differs between Windows and Linux in other minor but suspicious ways! Linux says "Notice:" as I expect, while Windows instead says "[Notice]" for the severity. The 3rd Linux field, "[-main-]", is completely missing on Windows! Likely that's related somehow? If Ns_ThreadGetName() returns NULL or empty string there, could that mess up the formatting of the rest of the line? The code that prints the log lines appears to be Ns_VALog() in "naviserver/nsd/log.c", either the Ns_DStringVPrintf() there or (more likely) the LogFlush() call. There are several code paths, and I do not know why one is relevant here, but maybe the string formatting actually happens in LogToDString(). ## Windows -f log output: [25/Jan/2019:16:10:43][12164.1cc0470000006a0][Notice] \???0: No support for OpenSSL compiled in [25/Jan/2019:16:10:43][12164.1cc0470000006a0][Notice] ?????0: nsmain: NaviServer/4.99 (NaviServer 4.99.17) starting [25/Jan/2019:16:10:43][12164.1cc0470000006a0][Notice] ??????0: nsmain: Tcl version: 8.5.16 [25/Jan/2019:16:10:43][12164.1cc0470000006a0][Notice] h???0: pool default: queueLength 90 low water 9 high water 72 [25/Jan/2019:16:10:43][12164.1cc0470000006a0][Notice] L??0: nsd/init.tcl[default]: booting virtual server: Tcl system encoding: "utf-8" [25/Jan/2019:16:10:43][12164.1cc0470000006a0][Notice] ?????0: modload: loading module nscp from file nscp [25/Jan/2019:16:10:43][12164.1cc0470000006a0][Notice] T???0: nscp[default]: listening on [::1]:2080 [25/Jan/2019:16:10:43][12164.1cc0470000006a0][Warning] (??0: nscp[default]: no authorized users [25/Jan/2019:16:10:43][12164.1cc0470000006a0][Notice] ?????0: modload: loading module nslog from file nslog ## Linux -f log output: [28/Jan/2019:10:33:20][28016.7fb29de89700][-main-] Notice: OpenSSL 1.0.2g 1 Mar 2016 initialized [28/Jan/2019:10:33:20][28016.7fb29de89700][-main-] Notice: nsmain: NaviServer/4.99.17 (7460924484c2 default tip) starting [28/Jan/2019:10:33:20][28016.7fb29de89700][-main-] Notice: nsmain: security info: uid=1010, euid=1010, gid=501, egid=501 [28/Jan/2019:10:33:20][28016.7fb29de89700][-main-] Notice: nsmain: Tcl version: 8.6.5 [28/Jan/2019:10:33:20][28016.7fb29de89700][-main-] Notice: nsmain: max files: soft limit 1048576, hard limit 1048576 [28/Jan/2019:10:33:20][28016.7fb29de89700][-main-] Warning: nsmain: rl_cur (1048576) > FD_SETSIZE (1024), select() calls should not be used [28/Jan/2019:10:33:20][28016.7fb29de89700][-main-] Notice: pool default: queueLength 90 low water 9 high water 72 [28/Jan/2019:10:33:20][28016.7fb29de89700][-main-] Notice: nsd/init.tcl[default]: booting virtual server: Tcl system encoding: "utf-8" [28/Jan/2019:10:33:20][28016.7fb29de89700][-main-] Notice: modload: loading module nscp from file nscp [28/Jan/2019:10:33:20][28016.7fb29de89700][-main-] Notice: nscp[default]: listening on [::1]:2080 [28/Jan/2019:10:33:20][28016.7fb29de89700][-main-] Warning: nscp[default]: no authorized users [28/Jan/2019:10:33:20][28016.7fb29de89700][-main-] Notice: modload: loading module nslog from file nslog -- Andrew Piskorski <a...@piskorski.com>
_______________________________________________ naviserver-devel mailing list naviserver-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/naviserver-devel