Logger descripiton.

This commit is contained in:
Stephan
2023-11-22 23:30:56 +01:00
committed by swg
parent 683115b818
commit 3db5c7fd0f

View File

@@ -10,10 +10,11 @@ The [check_folder_for_extension test folder](cffe_test) contains of 13 files, 12
function call: 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. For multiple extensions (or other parts of the file name to match) space separate the list, like shown above.
## Clean up ## Clean up
Cleaning up in a script and exit with a given exit code. 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 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!
```