<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
I have this pattern and it's working :<br>
<br>
<pattern>%d{HH:mm:ss} %-5p [%t] [%c{1}]
[%X{amtrac.serviceName}] [%X{amtrac.method}]
[%X{amtrac.clientProcessName}] [%X{identity_user_context_guid}]
[%X{identity_user_context_username}]
[%X{identity_user_context_partner_id}] [%X{amtrac.tx}]
MESSAGE=[%m]%n</pattern><br>
<br>
However, I would like to replace a NULL if any of the MDC is null as
a default value so...<br>
<br>
<pattern>%d{HH:mm:ss} %-5p [%t] [%c{1}] [%X{amtrac.serviceName<b>:-NULL</b>}]
[%X{amtrac.method<b>:-NULL</b>}] [%X{amtrac.clientProcessName<b>:-NULL</b>}]
[%X{identity_user_context_guid<b>:-NULL</b>}]
[%X{identity_user_context_username}]
[%X{identity_user_context_partner_id}] [%X{amtrac.tx}]
MESSAGE=[%m]%n</pattern><br>
<br>
I tried it but it seems like it totally stops logging anything.<br>
<br>
Thanks in advance!<br>
-Amit Mohan<br>
</body>
</html>