feature/logger #2

Merged
swg merged 3 commits from feature/logger into main 2024-02-17 22:36:03 +00:00
2 changed files with 84 additions and 1 deletions
Showing only changes of commit 3db5c7fd0f - Show all commits

View File

@@ -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!
```