mirror of
https://github.com/pi-hole/FTL.git
synced 2024-10-26 16:52:18 +02:00
Change default log file path to /var/log/pihole/FTL.log
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -241,7 +241,7 @@ void SQLite3LogCallback(void *pArg, int iErrCode, const char *zMsg)
|
||||
void db_init(void)
|
||||
{
|
||||
// Initialize SQLite3 logging callback
|
||||
// This ensures SQLite3 errors and warnings are logged to pihole-FTL.log
|
||||
// This ensures SQLite3 errors and warnings are logged to FTL.log
|
||||
// We use this to possibly catch even more errors in places we do not
|
||||
// explicitly check for failures to have happened
|
||||
sqlite3_config(SQLITE_CONFIG_LOG, SQLite3LogCallback, NULL);
|
||||
|
||||
@@ -1021,7 +1021,7 @@ bool gravityDB_getTable(const unsigned char list)
|
||||
// as there are domains available. Once we reached the
|
||||
// end of the table, it returns NULL. It also returns
|
||||
// NULL when it encounters an error (e.g., on reading
|
||||
// errors). Errors are logged to pihole-FTL.log
|
||||
// errors). Errors are logged to FTL.log
|
||||
// This function is performance critical as it might
|
||||
// be called millions of times for large blocking lists
|
||||
inline const char* gravityDB_getDomain(int *rowid)
|
||||
@@ -1066,9 +1066,8 @@ void gravityDB_finalizeTable(void)
|
||||
table_stmt = NULL;
|
||||
}
|
||||
|
||||
// Get number of domains in a specified table of the gravity database
|
||||
// We return the constant DB_FAILED and log to pihole-FTL.log if we
|
||||
// encounter any error
|
||||
// Get number of domains in a specified table of the gravity database We return
|
||||
// the constant DB_FAILED and log to FTL.log if we encounter any error
|
||||
int gravityDB_count(const enum gravity_tables list)
|
||||
{
|
||||
if(!gravityDB_opened && !gravityDB_open())
|
||||
|
||||
@@ -304,7 +304,7 @@ void logg_regex_warning(const char *type, const char *warning, const int dbindex
|
||||
if(getpid() != main_pid())
|
||||
return;
|
||||
|
||||
// Log to pihole-FTL.log
|
||||
// Log to FTL.log
|
||||
logg("REGEX WARNING: Invalid regex %s filter \"%s\": %s",
|
||||
type, regex, warning);
|
||||
|
||||
@@ -317,7 +317,7 @@ void logg_subnet_warning(const char *ip, const int matching_count, const char *m
|
||||
const int matching_bits, const char *chosen_match_text,
|
||||
const int chosen_match_id)
|
||||
{
|
||||
// Log to pihole-FTL.log
|
||||
// Log to FTL.log
|
||||
logg("SUBNET WARNING: Client %s is managed by %i groups (IDs %s), all describing /%i subnets. "
|
||||
"FTL chose the most recent entry %s (ID %i) for this client.",
|
||||
ip, matching_count, matching_ids, matching_bits,
|
||||
@@ -331,7 +331,7 @@ void logg_subnet_warning(const char *ip, const int matching_count, const char *m
|
||||
|
||||
void logg_hostname_warning(const char *ip, const char *name, const unsigned int pos)
|
||||
{
|
||||
// Log to pihole-FTL.log
|
||||
// Log to FTL.log
|
||||
logg("HOSTNAME WARNING: Host name of client \"%s\" => \"%s\" contains (at least) one invalid character at position %d",
|
||||
ip, name, pos);
|
||||
|
||||
@@ -341,7 +341,7 @@ void logg_hostname_warning(const char *ip, const char *name, const unsigned int
|
||||
|
||||
void logg_fatal_dnsmasq_message(const char *message)
|
||||
{
|
||||
// Log to pihole-FTL.log
|
||||
// Log to FTL.log
|
||||
logg("FATAL ERROR in dnsmasq core: %s", message);
|
||||
|
||||
// Log to database
|
||||
@@ -356,7 +356,7 @@ void logg_rate_limit_message(const char *clientIP, const unsigned int rate_limit
|
||||
{
|
||||
const time_t turnaround = get_rate_limit_turnaround(rate_limit_count);
|
||||
|
||||
// Log to pihole-FTL.log
|
||||
// Log to FTL.log
|
||||
logg("Rate-limiting %s for at least %ld second%s",
|
||||
clientIP, turnaround, turnaround == 1 ? "" : "s");
|
||||
|
||||
@@ -366,7 +366,7 @@ void logg_rate_limit_message(const char *clientIP, const unsigned int rate_limit
|
||||
|
||||
void logg_warn_dnsmasq_message(char *message)
|
||||
{
|
||||
// Log to pihole-FTL.log
|
||||
// Log to FTL.log
|
||||
logg("WARNING in dnsmasq core: %s", message);
|
||||
|
||||
// Log to database
|
||||
|
||||
Reference in New Issue
Block a user