mirror of
https://github.com/pi-hole/pi-hole
synced 2025-01-05 13:40:56 +00:00
Merge pull request #1160 from pi-hole/logSizeToDebugLog
Log size to debug log
This commit is contained in:
commit
b3b7aae7d7
@ -361,10 +361,21 @@ files_check "${ADLISTFILE}"
|
|||||||
|
|
||||||
header_write "Analyzing gravity.list"
|
header_write "Analyzing gravity.list"
|
||||||
|
|
||||||
gravity_length=$(wc -l "${GRAVITYFILE}") \
|
gravity_length=$(grep -c ^ "${GRAVITYFILE}") \
|
||||||
&& log_write "${GRAVITYFILE} is ${gravity_length} lines long." \
|
&& log_write "${GRAVITYFILE} is ${gravity_length} lines long." \
|
||||||
|| log_echo "Warning: No gravity.list file found!"
|
|| log_echo "Warning: No gravity.list file found!"
|
||||||
|
|
||||||
|
header_write "Analyzing pihole.log"
|
||||||
|
|
||||||
|
pihole_length=$(grep -c ^ "${PIHOLELOG}") \
|
||||||
|
&& log_write "${PIHOLELOG} is ${pihole_length} lines long." \
|
||||||
|
|| log_echo "Warning: No pihole.log file found!"
|
||||||
|
|
||||||
|
pihole_size=$(du -h "${PIHOLELOG}" | awk '{ print $1 }') \
|
||||||
|
&& log_write "${PIHOLELOG} is ${pihole_size}." \
|
||||||
|
|| log_echo "Warning: No pihole.log file found!"
|
||||||
|
|
||||||
|
|
||||||
# Continuously append the pihole.log file to the pihole_debug.log file
|
# Continuously append the pihole.log file to the pihole_debug.log file
|
||||||
dumpPiHoleLog() {
|
dumpPiHoleLog() {
|
||||||
trap '{ echo -e "\n::: Finishing debug write from interrupt... Quitting!" ; exit 1; }' INT
|
trap '{ echo -e "\n::: Finishing debug write from interrupt... Quitting!" ; exit 1; }' INT
|
||||||
|
Loading…
Reference in New Issue
Block a user