What's new

Solved Customize default System Log | General Log web page with grep?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

kstamand

Occasional Visitor
I am aware of and familiar with Scribe, but I‘m curious if it’s possible or if anyone has already created a customization to the ”System Log | General Log” Web page that allows for filtering what displays in the log content window using grep??

Reason I ask is, when running Scribe / Uiscribe, I find the Ram usage is considerable and my goal is to see if there might be another way to filter the logs that is more efficient.
 
There is already a filter list in /www/ajax/logFilter.json that can be copied (e.g. to /jffs), modified and then run mount -o bind /jffs/logFilter.json /www/ajax/logFilter.json to take effect.
 
Thanks for the response @dave14305. Any reference anyplace on how to modify the json?
 
Making the changes as noted in post #2 of this thread worked, THANK YOU!!

Now what would be really cool would be if there was an option on the General Log Web page of the router to enter the filter strings instead of having a hardcoded file. Is that an available option anywhere?
 
To make the change persist across reboots, add to /jffs/scripts/services-start:
Bash:
#!/bin/sh

if [ -s /jffs/logFilter.json ]; then
    mount -o bind /jffs/logFilter.json /www/ajax/logFilter.json
else
    umount /www/ajax/logFilter.json 2>/dev/null
fi
Then run
Code:
chmod 755 /jffs/scripts/services-start
 

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top