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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...