MEONMedical / Log4Qt

Log4Qt - Logging for the Qt cross-platform application framework
Apache License 2.0
589 stars 235 forks source link

Set %F %M %L in properties file, but it can't work in windows #34

Closed wanguangtong closed 6 years ago

wanguangtong commented 6 years ago

I use Log4Qt-master code,and build in Qt 5.7.0.I set proterty through protpery file.I set " log4j.appender.daily.layout=org.apache.log4j.PatternLayout" and "log4j.appender.daily.layout.ConversionPattern=[%d{yyyy-MM-dd HH:mm:ss}] [%F:%M:%L] %-5p [%c] - %m%n".But Output result is "[2018-11-14 12:20:08] [::-1] INFO [daily] - Test1",file name,method,line num are wrong.

andibacher commented 6 years ago

Do you use the macros l4qError(..), l4qError(..) for logging? file, line, and function are only set if you use this macros. If you log with: logger()->debug() << "Debug output"; or logger()->warn("Warning"); file, line, and function are not set.

andibacher commented 6 years ago

I can not reproduce the problem and got no feedback how this is used. When using the appropriate macro l4qError(..), l4qError(..),... this works on all supported platform.