mufeed

Formatting That Long Ugly Looking Log Output [sharing code inclusions]

Discussion created by mufeed on Mar 7, 2016
Latest reply on Apr 24, 2017 by aalvarez

If you're like me and hate to go through those ugly looking log outputs in the posts, there is an easy way out. In the Rich text editor band you'll have a button that looks like >>. Clicking on that will give you several other options. What you need to go for is Syntax Highlighting > and choose Plain for a quick make-over of the section you've highlighted.

 

For example, the "Beast" will look like,

 

[root@n65 ~]# head /opt/mapr/logs/mfs.log-3

2015-12-13 17:36:04,0379 INFO  mapfs.cc:1311

******* Starting mfs server *******

*** mfs mapr-version: $Id: mapr-version: 5.0.0.32987.GA 32987:91644ddfd0ba $ ***

2015-12-13 17:36:04,0379 INFO  mapfs.cc:1339 FS : Using hostname n65, port: 5660, hostid 0x5fc81c7121259029 (6901797701158277161)

2015-12-13 17:36:04,0379 INFO  mapfs.cc:1341 Starting fileserver on :

2015-12-13 17:36:04,0379 INFO  mapfs.cc:1344 10.10.70.65:5660

 

and the same "Beauty" with a make-over will look like,

 

[root@n65 ~]# head /opt/mapr/logs/mfs.log-3
2015-12-13 17:36:04,0379 INFO  mapfs.cc:1311 
******* Starting mfs server *******
*** mfs mapr-version: $Id: mapr-version: 5.0.0.32987.GA 32987:91644ddfd0ba $ ***
2015-12-13 17:36:04,0379 INFO  mapfs.cc:1339 FS : Using hostname n65, port: 5660, hostid 0x5fc81c7121259029 (6901797701158277161)
2015-12-13 17:36:04,0379 INFO  mapfs.cc:1341 Starting fileserver on :
2015-12-13 17:36:04,0379 INFO  mapfs.cc:1344 10.10.70.65:5660

 

 

 

Another tip: You can use Markdown Here which is a google chrome plugin that allows you write markdown in any rich HTML editor.

Outcomes