Add misc.extraLogging to enable log-queries=extra defaulting to false
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
parent
2db977612c
commit
3a59b49df0
|
@ -470,6 +470,8 @@ components:
|
|||
type: array
|
||||
items:
|
||||
type: string
|
||||
extraLogging:
|
||||
type: boolean
|
||||
check:
|
||||
type: object
|
||||
properties:
|
||||
|
@ -712,6 +714,7 @@ components:
|
|||
privacylevel: 0
|
||||
etc_dnsmasq_d: false
|
||||
dnsmasq_lines: [ ]
|
||||
extraLogging: false
|
||||
check:
|
||||
load: true
|
||||
shmem: 90
|
||||
|
|
|
@ -1105,6 +1105,12 @@ void initConfig(struct config *conf)
|
|||
conf->misc.dnsmasq_lines.f = FLAG_ADVANCED_SETTING | FLAG_RESTART_FTL;
|
||||
conf->misc.dnsmasq_lines.d.json = cJSON_CreateArray();
|
||||
|
||||
conf->misc.extraLogging.k = "misc.extraLogging";
|
||||
conf->misc.extraLogging.h = "Log additional information about queries and replies to pihole.log\n When this setting is enabled, the log has extra information at the start of each line. This consists of a serial number which ties together the log lines associated with an individual query, and the IP address of the requestor. This setting is only effective if dns.queryLogging is enabled, too. This option is only useful for debugging and is not recommended for normal use.";
|
||||
conf->misc.extraLogging.t = CONF_BOOL;
|
||||
conf->misc.extraLogging.f = FLAG_RESTART_FTL;
|
||||
conf->misc.extraLogging.d.b = false;
|
||||
|
||||
// sub-struct misc.check
|
||||
conf->misc.check.load.k = "misc.check.load";
|
||||
conf->misc.check.load.h = "Pi-hole is very lightweight on resources. Nevertheless, this does not mean that you should run Pi-hole on a server that is otherwise extremely busy as queuing on the system can lead to unnecessary delays in DNS operation as the system becomes less and less usable as the system load increases because all resources are permanently in use. To account for this, FTL regularly checks the system load. To bring this to your attention, FTL warns about excessive load when the 15 minute system load average exceeds the number of cores.\n This check can be disabled with this setting.";
|
||||
|
|
|
@ -270,6 +270,7 @@ struct config {
|
|||
struct conf_item addr2line;
|
||||
struct conf_item etc_dnsmasq_d;
|
||||
struct conf_item dnsmasq_lines;
|
||||
struct conf_item extraLogging;
|
||||
struct {
|
||||
struct conf_item load;
|
||||
struct conf_item shmem;
|
||||
|
|
|
@ -345,7 +345,10 @@ bool __attribute__((const)) write_dnsmasq_config(struct config *conf, bool test_
|
|||
if(conf->dns.queryLogging.v.b)
|
||||
{
|
||||
fputs("# Enable query logging\n", pihole_conf);
|
||||
fputs("log-queries\n", pihole_conf);
|
||||
if(conf->misc.extraLogging.v.b)
|
||||
fputs("#log-queries=extra\n", pihole_conf);
|
||||
else
|
||||
fputs("log-queries\n", pihole_conf);
|
||||
fputs("log-async\n", pihole_conf);
|
||||
fputs("\n", pihole_conf);
|
||||
}
|
||||
|
|
|
@ -822,6 +822,14 @@
|
|||
# Use this option with extra care.
|
||||
dnsmasq_lines = []
|
||||
|
||||
# Log additional information about queries and replies to pihole.log
|
||||
# When this setting is enabled, the log has extra information at the start of each
|
||||
# line. This consists of a serial number which ties together the log lines associated
|
||||
# with an individual query, and the IP address of the requestor. This setting is only
|
||||
# effective if dns.queryLogging is enabled, too. This option is only useful for
|
||||
# debugging and is not recommended for normal use.
|
||||
extraLogging = false
|
||||
|
||||
[misc.check]
|
||||
# Pi-hole is very lightweight on resources. Nevertheless, this does not mean that you
|
||||
# should run Pi-hole on a server that is otherwise extremely busy as queuing on the
|
||||
|
|
Loading…
Reference in New Issue