Page 1 of 1

Log Viewer (Admin Utility)

PostPosted: Sat Aug 12, 2023 5:57 am
by martinch
Hey guys, back once again, another utility if anyone is interested in such a thing. This one is basically a ViCi log viewer. Handy if you're stuck with a problem and you need to get support maybe on here or from the ViCiDial team orwhoever supports your ViCi stack and this log viewer might be useful to you. You can simply select any of the available log files and have them output right there in the Admin Panel. You can then copy the log in one click and paste it. There is also an option to save the log locally so you can upload that to your support vendor whoever that may be :) Anybody interested in any feature like that? Let me know what you guys think...could you make use of this? Always interested in knowing what you guys think. Thank you :)

Image

Re: Log Viewer (Admin Utility)

PostPosted: Sat Aug 12, 2023 6:24 am
by mflorell
Do you have any size limitations on this? Because on a busy system(especially a dialer that isn't rebooted regularly) the log files could be up to 2GB in size, and accessing them in this way could easily crash a system.

Re: Log Viewer (Admin Utility)

PostPosted: Tue Aug 15, 2023 6:17 am
by martinch
mflorell wrote:Do you have any size limitations on this? Because on a busy system(especially a dialer that isn't rebooted regularly) the log files could be up to 2GB in size, and accessing them in this way could easily crash a system.


Oh hey Matt, no I have no considered log file sizes...although I do have a log file that is around 1.5GB in size (only the one though!) and working with that file in PHP is a little tedious...so yeah, it's a very good shout. I mean, I would hope that many ViCi administrators are rotating on a daily basis and keeping their systems running optimally. I understand that certain systems don't get rebooted but at least the logs will get rotated. I would encourage log rotation. However, given your feedback, it would make sense to add log levels...such as display the last 100 lines, or 1000 lines or whathaveyou to ease pressure on the server. In PHP we do have the function "filesize()" that will give us a headsup if the file is humungous so can gracefully decline to parse it :) I've also had to modify max_memory in PHP for large files (like that biggie quoted earlier) so there is more development to be done here. Cheers for the feedback Matt I really appreciate :)