Debugging made easier with Python Script

Tell everybody, what you think about SafeSquid!
Speak your mind!
India aashish97
Posts: 117
Joined: Sat Jul 06, 2019 10:45 am

Debugging made easier with Python Script

Post by aashish97 » Mon Apr 13, 2020 4:23 am

Hello All,

Let's make debugging easier and faster for all of us.

We all invest alot of time trying to first get the necessary debugging information whenever user faces a problem while using SafeSquid-SWG.

The reason it takes so long is because depending upon the load the log file will be very big in size and taken taken to get the debugging details will therefore increase
Secondly, zipped files are huge and logs are scattered in unordered manner in file.therefore time taken to search for a particular unique client id and copy paste each and every respective debug log becomes tedious and time consuming.

And after receiving the debugging information it becomes easier for us as well as or the customer end to understand and take the necessary action to solve or mitigate the problem.

Therefore looking at this problem, we @ SafeSquid-SWG have created a python script to easily get the debugging for a particular connection using the client id provided by SafeSquid-SWG




Script indetailed explaination:

This Python based script which makes it easy to get the Client ID Details with headers
so that when we get the client ID from Debug Headers we can just run the Script and get the Appropriate(Related Logs). This really saves time.

Using this Script is very easy.
script name with argument as ID as shown below in screenshot
simpleRun.png
simpleRun.png (49.73 KiB) Viewed 1240 times

It By Default PROCESSES data from safesquid.log file it can be changes by providing input
as shown below
specifyFileToGetClientIDdetails.png
specifyFileToGetClientIDdetails.png (50.48 KiB) Viewed 1240 times

It can also be used to PROCESS piped data
[NOTE: for that we need to change the script comment the read file part and uncomment the read from stdin part ]
A Good Example is getting zipped data client details
As shown below
getClientiddetailsfromCompressedFiles.png
getClientiddetailsfromCompressedFiles.png (103.78 KiB) Viewed 1240 times
This script should be downloaded by all users inorder to debug the problem faster.