Quantcast
Channel: THWACK: Message List - Kiwi Syslog
Viewing all articles
Browse latest Browse all 2141

Re: is it possible to have syslog messages in one line instead of a multi-line syslog message?

$
0
0

Hi

 

Here is the solution I am using.

It's a way to replace CRLF with a space using Action: Run Script.

 

1)  Save the following script file as a text file in any folder of PC where KSS is installed.

 

The contents of this file are:

--------------------------------------

Function Main()

 

' Replace cat with dog within the message text field

Fields.VarCleanMessageText = Replace(Fields.VarCleanMessageText, vbCrLf, " ")

 

' Return OK to tell syslog that the script ran correctly.

Main = "OK"

 

End Function

---------------------------------------

 

I saved it as "Script_ReplaceText_CRLF2space.txt.

 

2) Add "Action: Run Script" to the rule

It needs to be added above "Action: Display" and "Action: Log to file".

The reason is that KSS executes Action in order from the top.

 

3) Specify the script file of 1) in "Action: Run Script".

Enable all checkboxes in Field Read/Write permissions.

It will be as follows:

Action:Run Script

 

 

The Display before and after running this script is:

The above log message is when script execution is enabled. Below is the case when script execution is disabled.


Viewing all articles
Browse latest Browse all 2141

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>