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!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...