How to see logs with out Esc and other gibberish stuff in logs ?

 So when you are trying to read logs, sometimes they look like this, using vim is okay at-least some readability, but less will show awful results. 

ESC[34m2023-04-15 04:33:57ESC[0m ESC[33m  TRACEESC[0m [ESC[36mApplicationESC[0m] ESC[37mpid: 562425ESC[0m

ESC[34m2023-04-15 04:33:57ESC[0m ESC[35m  DEBUGESC[0m [ESC[36mApplicationESC[0m] ESC[37minteractive: falseESC[0m

ESC[34m2023-04-15 04:33:57ESC[0m ESC[35m  DEBUGESC[0m [ESC[36mFileResolverESC[0m] ESC[37mSearching: /server/files ESC[0m

if you want to read logs clearly, then you can still use less command with -R flag.

less -R <log_file_name>


Hope it helps.

Thanks.

Raja

Comments

Popular posts from this blog

grep: unknown device method

Uploading files to FTP/SFTP using CURL

How to find outgoing IP in Linux ?