- Jul 29, 2021
-
-
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
Fine grained logging See merge request !1181
-
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
-
Our randomness utils have nothing to do with TLS, so let's use SYSTEM.
-
* improve order - follow grouping of topics more closely (targets, groups, levels) - order kr_log_LEVEL by severity * move unneeded <stdarg.h> * improve doc-comments - some claims there were even wrong now - describe some log levels at kr_log_LEVEL
-
Let's be consistent witk kr_log_name2level() and even generally we tend to use negative numbers for errors.
-
It's a non-standard feature of syslog.h and I don't think it's worth the trouble. We didn't really utilize it; someone would have to #define it, and moreover we would get into problems if this wasn't being done the same on all places including log.h. Making the names adapt to the platform would also mean that config files and docs wouldn't be portable. Also make kr_log_level2name() return const.
-
- we don't need doubling the layer in this case, as the SD_JOURNAL_METADATA macro adds a layer already - `TO_STR` was perhaps a too short name and could collide
-
Tomas Krizek authored
-
Tomas Krizek authored
-
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.
-
-
Tomas Krizek authored
-
-
-
-
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.
-
... so we can use it for more precise logging. Some calls get simpler. In particular, without the associated request, we can't produce anything into trace-logs, which could be confusing. Normal logs will benefit, too. (more precise replacement of WITH_VERBOSE will come in a subsequent commit)
-
... and optimize a suspect hot path (through VERBOSE_MSG)
-
I think it's an old issue, but why not fix it now. I believe it's better when these two are "independent". Removed comment: once upon a time it belonged to auto_free and similar macros, but somehow it survived various moves.
-
- 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
-
It would be yet another condition to check; overall I think the necessary checks would get too complex to be done in a macro and therefore copied all over the place. Note: it's interesting that such a change reduces binary size by about 3% (on master), and I suspect that speed won't suffer at all (after that TODO is done).
-
- 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
- ensure gnutls logging can be turned on/off by using GNUTLS log group - keep TLS / TLSCLIENT as log groups for our TLS logs and use GNUTLS instead
-
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
-