- Aug 10, 2021
-
-
Logging is not set up at this point; it wouldn't be shown unless preceded by -v/--verbose.
-
- Aug 09, 2021
-
-
Vladimír Čunát authored
This is all that's missing in comparison to enum knot_rr_type. For now I didn't remove types that aren't present there (anymore), even though noone would miss them, most likely.
-
- Aug 05, 2021
-
-
Vladimír Čunát authored
I considered switching it to our usual 3-option combo, but that way didn't really seem useful.
-
Vladimír Čunát authored
I didn't intend to use this mix of tabs and spaces for indentation.
-
- Jul 30, 2021
-
-
Vladimír Čunát authored
-
- Jul 29, 2021
-
-
Tomas Krizek authored
-
Tomas Krizek authored
-
Tomas Krizek authored
-
Tomas Krizek authored
Ignored queries never call create_request() where ownership of headers is taken care of. They need to be explicitly cleared instead, because we're the owners of the pointer here.
-
Tomas Krizek authored
-
Tomas Krizek authored
-
Tomas Krizek authored
-
Tomas Krizek authored
-
Tomas Krizek authored
-
Vladimír Čunát authored
- we've been using lua's formatting so far, so avoid changing that - some lua values would be harder to format with the C style
-
Let's be consistent witk kr_log_name2level() and even generally we tend to use negative numbers for errors.
-
Tomas Krizek authored
-
Tomas Krizek authored
Use a single call as a setter and getter for log groups.
-
Tomas Krizek authored
Refactor into more consistent lua API.
-
Tomas Krizek authored
Using a single function to get/set values is more consistent with our existing lua API rather than having two separate set and get functions.
-
It's mainly in tests.
-
- add lua set_log_target() + docs - default to 'stderr' (manual runs) - switch to 'syslog' in distro-preconfig.lua - a few minor tweaks
-
Probably, it seems "more consistent". Some defines still don't have it, but I left those.
-
logging
-
The main problem there was ignoring the log groups, and VERBOSE_STATUS also ignores trace-logging. Typically the new kr_log_is_debug*() are the best choice. In a couple places with heavy WITH_VERBOSE usage it's instead locally redefined to consider the right group.
-
- unify interactive mode to stdout - use its own logging group - elevated log level when the command throws an exception - don't try detecting that the logs go back into the same console (yes, in that case you can see some lines twice) - don't make the binary mode turn off logging
-
- const for names of log groups - enum kr_log_group for a single log group - the kr_log_groups bitmap doesn't need to be exposed or even exported - return bool instead of int
-
Tomas Krizek authored
It's better to use separate log group, to separate between logs that come from the lua module vs native C implementation. It is also more descriptive, since http modules is used for other stuff besides its deprecated DoH.
-
Tomas Krizek authored
-
Tomas Krizek authored
Plural makes more sense to me here, since it can take a table with multiple entries as input.
-
Tomas Krizek authored
Besides testing the API, running this test also ensures all log groups have been properly defined (as long as kr_assertions are turned on).
-
Tomas Krizek authored
To ensure all log groups have been properly defined, iterate over the entire enum. If a value is missing, assert will be triggered. Also fixes groups with number >=32 (32bit value was used to test whether group is set before).
-
Tomas Krizek authored
This serves two purposes: 1. As a utility logger during development. 2. As the last entry in enum - to make iteration over the values possible. Changing the value of LOG_GRP_DEVEL shouldn't be an issue, since it shouldn't be used in production code.
-
Tomas Krizek authored
Add space padding when printing the group name to allow usage of regular group names in lua code (e.g. "io" instead of "io ").
-
Tomas Krizek authored
The function returns a table where key is the group name and the value is either true (when logging selected group), or nil (when group isn't selected). This replaces the list_log_group() which didn't really work.
-
Tomas Krizek authored
Ensure both these functions return string that represents the log level. Also avoid using printf - it'd probably break API when using map().
-
Tomas Krizek authored
-