From 3db5c7fd0f6aae67d38abc4ca4846bbe7e4f7271 Mon Sep 17 00:00:00 2001 From: Stephan Date: Wed, 22 Nov 2023 23:30:56 +0100 Subject: [PATCH] Logger descripiton. --- README.md | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index bcf9550..e3c6248 100644 --- a/README.md +++ b/README.md @@ -10,10 +10,11 @@ The [check_folder_for_extension test folder](cffe_test) contains of 13 files, 12 function call: ``` -check_folder_for_extension ./cffe_test "*.jpg *.JPG" +check_folder ./cffe_test "*.jpg *.JPG" ``` For multiple extensions (or other parts of the file name to match) space separate the list, like shown above. + ## Clean up Cleaning up in a script and exit with a given exit code. @@ -27,3 +28,34 @@ For testing the function call the script with: ``` clean_up.sh test ``` + +## Logger + +[Logger](logger.sh) to write messages with individual levels to a file. + +In level *debug* all logged messages are printed to stdout, too. + +Log levels are + +5 LLDebug, *for exceptionally verbose messages, also on std out* + +4 LLInfo, *informative messages* + +3 LLWarning, *warning messages* + +2 LLError, *error messages* + +1 LLMdtry and *mandatory messages to get minimal info in a log file* + +0 LLMute *really nothing gets written* + +The higher the level set in `$Log_Level` to the logger, the more verbose it gets. + +``` +logger $LLWARNING "This is my message"; +``` +produces the following message in the log file: + +``` +logger 20231122_22:43:19 Warning: This is my message! +```