How to use a number to distinguish the processing logs of different requests in the log4j log in the tornado web service

my server framework is tornado framework, which uses log4j to print logs. How to make sure that there is a number similar to thread id in the log generated by each request to distinguish between different requests for printing logs, a bit like thread id, but each request for printing thread id is the same, what a good solution, using no number to identify logs generated without request processing

Mar.03,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b323f7-2b577.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b323f7-2b577.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?