Splunk Search

Changing the color of comment macro

juhisaxena28
Explorer

We can add comments to a splunk search by using "comment" macro. However to distinguish between SPL and comment, is there any option to change the color for "comment" in SPL query?

Currently we are using comments all in uppercase letters to make it easy for us to read and differentiate from SPL query but would like to extend it to colors as well.

Tags (2)
0 Karma

jeffland
SplunkTrust
SplunkTrust

I don't know of a way to change the color scheme of SPL syntax highlighting, but I tend to insert blank lines (Shift + Enter) to format my searches readable. You could do the same with your comments, could look like this:

index=foo keyword
| eval stuff = bar
| lookup baz source

`comment("explicit lookup to avoid something for some reason")`

| table stuff source ...
Get Updates on the Splunk Community!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...