This variable allows you to add contextual information to your log entries (like the session ID or username of the currently logged-in user, etc. This applies only when using manual configuration of LogManager through configuration file. In the <layout> section of an appender, you can add the value of a thread context variable using the following syntax:
[%X{user} %X{session}]
You can then set two thread context values for key "user" and key "session" and they will print out in the log file.
For more information on configuring LogManager and defining appenders and layouts, please consult the user guide for your application.
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family