Carlos E. R. wrote:
On Saturday, 2023-03-11 at 13:10 +0100, Per Jessen wrote:
Per Jessen wrote:
This week I've been working on a small proxy daemon for nginx, hopefully it will reduce the memory footprint on mailman3. It writes some warnings -
message( 0, "Unable to allocate %luMb for map", message( 0, "something went wrong, %s could not be loaded", mapfile ); message( 0, "map loaded, %u invalid entries", inv ); message( 0, "getaddrinfo(%s) failed: error %d: %s\n", hostname, rc, gai_strerror(rc) ); message( 0, "socket() failed: error %d: %s\n", errno, strerror(errno) ); message( 0, "bind() failed: error %d: %s\n", errno, strerror(errno) ); message( 0, "listen() failed: error %d: %s\n", errno, strerror(errno) ); message( 0, "select() failed: error %d; %s", errno, strerror(errno) );
So Carlos, with your built-in sense for what is debug, warning and error - how would you deal with the above?
Anything worth reporting to the developer?
They don't seem to me entries from the /var/log/warn file, and I'm not familiar with that tool.
Well, as I wrote "I've been working on a small proxy daemon for nginx", so you would not have seen any of those warnings in your logfile nor could you be familiar with that daemon :-)
They seem to me cryptic debug messages intended to be understood only by the programmer,
Actually, they are all reports of something have gone wrong, locally. Inability to allocate memory - local problem. Inability to load mapfile - local problem. Invalid entries in mapfile - local problem. Inability to resolve hostname - local problem. socket/bind/list/select - local problems. For instance, inability to create a socket could mean a lack of local file descriptors, or maybe some apparmor issue.
so they should not be written to "/var/log/warn" file.
Well, that is of course of up to your local syslog config, but as they are likely local problems, what do you suggest the programmer should do with them? If they are classed as debug, nobody will ever see them, and the dameon will fail without notice. -- Per Jessen, Zürich (12.8°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes