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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...