In the settings checker, if a regex_clean is set as None then we will abort the script with error
if the regex is not matching
Add regex check for email basic
Also add a regex_constants list with regex entries (not compiled and compiled)
Add levels for ALERT, EMERGENCY to be syslog compatible
Add direct wrappers for all, but they are not yet fully usable because the stack fix is not yet implemented
Add a new debug helepr to get the stack as a string
Add flush for queue flushing
Add set/get level for handler
Allow adding handlers during launch, handlers cannot be added afterwards at the moment
Add testing for LoggingLevel enum
list_helpers:
convert to list, any input, output is always a list
compare to lists, check what elements from A are not in B, type safe
string helpers
add is_int, is_float checker
add string to bool converter for true/True/false/False strings
config reader with parsing and checking
The simple config reader is now in the corelibs with the basic content check, convert to list for entries, convert to value for entries, etc
log updates:
Add Log type Enum for better log level checks and convert
Add a get int for requested log level, and return default if not found
Make the validate log level a static function
Add tests for list helpers and new string helpers
Add all logging levels as Enum class type (same as for the PHP CoreLibs Logging)
Add a new method to get the log level as int with fallback via the LoggingLevel Enum
in the QueueLister launcher add "respect_handler_level=True" so it respects the previous set log levels per handler
Also split all logging tests into their own file
enables Queues if multiprocessing.Queue() is set in the "log_queue" setting
Now a logger "Log.init_worker_logging" can be attached to the ProcessPoolExecutor,
the init args must be the log_queue set
example:
```py
with concurrent.futures.ProcessPoolExecutor(
max_workers=max_forks,
initializer=Log.init_worker_logging,
initargs=(log_queue,)
) as executor:
````
Move all settings into a settings argument, the structure is defined in LogSettings.
Default settings are in Log.DEFAULT_LOG_SETTINGS
Only log path and log name are parameters
Color output for console is on default enabled, disable via "console_color_output_enabled"
The complete console output can be stopped with "console_enabled"
pytest added for dev.
Move all the test run python scripts into the "test-run" folder, so we can use the tests/ folder for just tests.
Setup one test for the TimestampStrings class with pytests in tests/unit/string_handling/test_timestamp_strings.py
only dict, list or str, str will be returned as list
Ignore any errors for recursive call because it thinks value is [unknown]
-> this should be checked that value is [str, Any] or list[dict[str, Any]]