Project: talendesb
Issue TESB-11139: EventLogging: Attribute prefix for event headers is not convenient
The attribute prefix for log events is currently as follows: {code} /** The Constant ATTR_PREFIX. */ public static final String ATTR_PREFIX = "org.talend.esb.event.header."; {code} This is not very convenient. Camel supports an [OGNL dot notation|http://camel.apache.org/ognl.html] to invoke operations. Therefore using a dot within a header field would easily cause confusing (even thou it is working). Camel uses a CamelLetterConvention for header field names. This would also be recommended for talend log events. Use an common prefix without dot notation for attribute names related to event logging. For Example this would be appropriate: {code} /** The Constant ATTR_PREFIX. */ public static final String ATTR_PREFIX = "tesbEventLogging"; /** The Constant ATTR_ID. */ public static final String ATTR_ID = ATTR_PREFIX + "Id"; /** The Constant ATTR_CATEGORY. */ public static final String ATTR_CATEGORY = ATTR_PREFIX + "Category"; ... {code} Alternatively IMHO it would also be OK to use one Dot at the end of the attribute prefix like this: {code} /** The Constant ATTR_PREFIX. */ public static final String ATTR_PREFIX = "tesbEventLogging."; /** The Constant ATTR_ID. */ public static final String ATTR_ID = ATTR_PREFIX + "id"; /** The Constant ATTR_CATEGORY. */ public static final String ATTR_CATEGORY = ATTR_PREFIX + "category"; ... {code} (i) Please notice uppercase of first letter in first example.
Story points: 1