Technical Tip: How to extract Console logs downloaded from GUI with Ubuntu WSL
Description
This article describes how to extract Console logs downloaded from the GUI. Windows Subsystem for Linux can be installed to run Linux commands. When the console logs are downloaded from the GUI, it is not viewable with a text editor because the file being compressed with Zlib needs to be extracted first.
Scope
FortiGate
Solution
- Download the Console logs on the GUI: Technical Tip: How to use the COMLog feature and go under System -> Settings -> Debug Logs -> Regenerate -> Download.
- On the PC, run the commands below on PowerShell with the Administrator account:
wsl --install
- Select the Start menu and then enter the directory below. Change the <username> to the relevant user. Copy the file from Step 1 and paste it on this directory: \\wsl$\Ubuntu\home\<username>

 
- Select the Start menu, search Ubuntu, and then select Ubuntu. Enter 'pwd' command to show the current directory. Enter 'ls' to check the file that it is on the directory.
pwd
ls

 
 
- Enter 'sudo apt install qpdf' to install zlib-flate. zlib-flate is part of qpdf. Enter the command below to extract the file:
sudo apt install qpdf
zlib-flate -uncompress < comlog.log > comlogout.txt

  
- Open the directory from Step 3. Open comlogout.txt with a Notepad or any Text Editor.


 
Related article:
