Hi,
I came across "**Splunk Logging best practices**" article ([http://dev.splunk.com/view/logging-best-practices/SP-CAAADP6][1]) and it seemed like using the provided **SplunkCimLogEvent** class would help in logging correctly, however, after a very brief trial I came across 2 things that seemed to contradict Splunk's own best practice advice.
1. Key=value pairs are not comma separated but space separated, i.e. key=value key=value rather then key=value, key=value
2. Both the key and the value are quoted together, i.e. "Key=Value" rather than just key="value" or "key"="value"
Anyone have experience in using the SplunkCimLogEvent class for logging from Java apps?
Has it helped or should I just stick with what we have, which is direct logging of key=value pairs?
The main thing I was interested in was SplunkCimLogEvent's support of exception/stacktrace logging, anyone think this is useful or again just stick with logging exceptions the normal way across multiple lines in the logfile?
I used the dependency com.splunk.logging:splunk-library-javalogging:1.5.0.
[1]: http://dev.splunk.com/view/logging-best-practices/SP-CAAADP6
↧