When I used previous versions of Log4j2, only requests sent by my application were being written to my log file in my log folder on my computer. For example:
But when I switched to the new version of Log4j, because of the vulnerability, before the messages I showed above, when my spring boot project runs, its messages also written. I mean focus on following.
but I don't want to see these messages in my log file. I just want to write messages when request and response are generated, like before my configuration. How to solve this? I mean I want to only messages to the log file which my requests and responses.
I'm surprised you didn't see this logging before. Your configuration defines a logger for om.company.projectName, but every other logging uses the root logger configuration. That says to log it on info, and that's exactly what you're getting.
If you want to disable this logging, either change the level for the root logger to error or warn, or add a new logger for org.springframework with a level of error or warn to just decrease the Spring (Boot) logging.