]> mj.ucw.cz Git - libucw.git/commit
Logging: Report logging errors.
authorMartin Mares <mj@ucw.cz>
Thu, 19 Feb 2009 17:48:23 +0000 (18:48 +0100)
committerMartin Mares <mj@ucw.cz>
Thu, 19 Feb 2009 17:48:23 +0000 (18:48 +0100)
commit3ad33092fedd857c36895fa4237c59e66e1fe0eb
tree913dea136f8feda8b1ee82f31ad648106ba4e2a7
parent1e3a1935f1b1778b40a7d5276c7b2f8c311756e7
Logging: Report logging errors.

Introduce an analogue of the infamous "Error while printing error message" :-)

When logging to a stream fails, the error is reported to the default stream,
but there are two precautions against infinite loops and floods of error
messages. First, we never report an error when logging of an error fails.
Second, we report only the first failure of a stream.

It is also possible to request program termination when logging fails.
ucw/lib.h
ucw/log.c
ucw/log.h