Decorator combine to field values with newline

(Rayees Namathponna) #1

Hi All,

I am using decorator to combine two field’s values and store into new field, I want to add new line between these two values, i tried add \n but its getting into new line example

Format String : {Input_App_Name_01} \n {Input_App_Name_02}
Target field : Input_App_Name

Getting the result like

oneday_profile n /base/test/parse//userprofile/oneday/profile

I am expecting like



Any idea how to do this ??

(Philipp Ruland) #2

Hi @ryz.namathp,

I tried some usual escapes for a line break, but they all don’t seem to work. I guess Decorators are either filtered (so that control instructions like \n are removed) or they are interpreted as a normal string but ignores control instructions / escapes.

I think it is the first one, because to get a \ in a Decorator you actually have to write \\ (the escaped version of a backslash). But don’t quote me on that, Google also revealed no information about this (only some issues with line breaks in the message field like this or this, but these are very old)

Greetings - Phil

(Rayees Namathponna) #3

I tried with \ but its not working :frowning:

(Philipp Ruland) #4

As I said, I guess Graylog filters the Decorator config regarding special characters. Wait for an @Graylog_staff member to clarify this :slight_smile:

(Rayees Namathponna) #5

@jochen any idea about this ?

(Jochen) #6

The message decorators currently don’t support special escape codes, such as \n (newline) and \t (tab), and will filter these.

(Rayees Namathponna) #7

Submitted ticket to support this