Now I gave up. I have been struggling with this issue for far too long. Configuring log4j makes logical sense and I thought I understand it, but apparently not. Searching for help has not yielded any results and it feels like I always get the same explanations and they do not work. What I am trying to do is control the level and layout of logs I am not really interested in for example everything from org.springframework package would be logged at fatal level using pattern layout X and everything from my own package would be logged at trace level with pattern layout Y. Simple right? So I thought, but this just simply doesn’t seem to work as logic would dictate. It is very possible that there is a very simple error staring at me, but I just cannot see it. I am using Spring Boot (2.6.1 at the moment updating is on my todo list) and AFAIK log4j2 2.17.0. Here is my log4j.properties:
# Extra logging related to initialization of Log4j
# Set to debug or trace if log4j initialization is failing
status = warn
# Name of the configuration
name = ConsoleLogConfigDemo
# Predefine appenders
appenders=FNETC, console
# Console appender configuration
appender.console.type = Console
appender.console.name = consoleLogger
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = ================================ ROOT ========================= %d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
# Console appender configuration
appender.FNETC.type = Console
appender.FNETC.name = fnetLogger
appender.FNETC.layout.type = PatternLayout
appender.FNETC.layout.pattern =[FNet [%-pl]] [c{1} - %m%n]
#log4j.logger.com.orbital3d.server.fnet=trace, fnetc
logger.com.level = TRACE
logger.com.name=com.orbital3d
logger.com.appenderRef = fnetLogger
# Root logger level
rootLogger.level = warn
rootLogger.appenderRef.stdout.ref = consoleLogger
The root logger seems to work, but anything from com.orbital3d.server.fnet does not appear on the console.