From 2c735b8dfb35b6163d4223dd3cc622a36c82aecc Mon Sep 17 00:00:00 2001 From: Sergiu Deitsch Date: Sat, 6 Jan 2024 15:04:12 +0100 Subject: [PATCH] docs: cleanup (#1041) --- README.rst | 257 +++++++++++++++++++++++++++++++------------------ src/logging.cc | 7 +- 2 files changed, 166 insertions(+), 98 deletions(-) diff --git a/README.rst b/README.rst index 7d9ba4515..8ec04aa5d 100644 --- a/README.rst +++ b/README.rst @@ -46,8 +46,8 @@ their usage, please refer to the `user guide <#user-guide>`__. .. pull-quote:: [!IMPORTANT] - The above example requires further Bazel or CMake setup for - `use in own projects <#usage-in-projects>`__. + The above example requires further `Bazel <#bazel>`__ or + `CMake <#usage-in-projects>`__ setup for use in own projects. .. contents:: Table of Contents @@ -221,23 +221,63 @@ Severity Levels ~~~~~~~~~~~~~~~ You can specify one of the following severity levels (in increasing -order of severity): ``INFO``, ``WARNING``, ``ERROR``, and ``FATAL``. +order of severity): + +1. ``INFO``, +2. ``WARNING``, +3. ``ERROR``, and +4. ``FATAL``. + Logging a ``FATAL`` message terminates the program (after the message is -logged). Note that messages of a given severity are logged not only in -the logfile for that severity, but also in all logfiles of lower -severity. E.g., a message of severity ``FATAL`` will be logged to the -logfiles of severity ``FATAL``, ``ERROR``, ``WARNING``, and ``INFO``. +logged). + +.. pull-quote:: + [!NOTE] + + Messages of a given severity are logged not only to corresponding severity + logfile but also to other logfiles of lower severity. For instance, a message + of severity ``FATAL`` will be logged to logfiles of severity ``FATAL``, + ``ERROR``, ``WARNING``, and ``INFO``. The ``DFATAL`` severity logs a ``FATAL`` error in debug mode (i.e., there is no ``NDEBUG`` macro defined), but avoids halting the program in production by automatically reducing the severity to ``ERROR``. -Unless otherwise specified, glog writes to the filename -``/tmp/\.\.\.log.\.\-\.\`` -(e.g., -``/tmp/hello_world.example.com.hamaji.log.INFO.20080709-222411.10474``). -By default, glog copies the log messages of severity level ``ERROR`` or -``FATAL`` to standard error (``stderr``) in addition to log files. +Unless otherwise specified, glog uses the format + +:: + + /...log..-