Thread: [Log4cplus-devel] [ log4cplus-Support Requests-3560984 ] creating custom log level and setting it f
Logging Framework for C++
Brought to you by:
wilx
From: SourceForge.net <no...@so...> - 2012-08-28 13:38:14
|
Support Requests item #3560984, was opened at 2012-08-23 05:12 Message generated for change (Comment added) made by You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=429074&aid=3560984&group_id=40830 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: v1.0.4 Status: Pending Priority: 5 Private: No Submitted By: https://www.google.com/accounts () Assigned to: Václav Zeman (wilx) Summary: creating custom log level and setting it from prperty file Initial Comment: Hello, I am trying to create custom log levels but I have faced these problems: 1. I am not able to set custom log level from property file, log4cplus crashes (Getting error: log4cplus:ERROR LoggerImpl::getChainedLogLevel()- No valid LogLevel found); 2. If I set custom log level in my program, then log level in log file is named: UNKNOWN; Info about log4cplus: Using static library Version - 1.0.4 Build system - VisualStudio 2010 (project configuration is Debug) Windows 7 SP1, 64bit Config file: log4cplus.rootLogger=TRACE1, Main log4cplus.appender.Main=log4cplus::RollingFileAppender log4cplus.appender.Main.File=myLogFile.log log4cplus.appender.Main.Append=true log4cplus.appender.Main.MaxFileSize=10MB log4cplus.appender.Main.MaxBackupIndex=50 log4cplus.appender.Main.layout=log4cplus::PatternLayout log4cplus.appender.Main.layout.ConversionPattern=%d | [%-7p] | %-20c | %-20m |%n ---------------------------------------------------------------------- Comment By: https://www.google.com/accounts () Date: 2012-08-28 06:38 Message: I will try your suggestions next week. Also I have noticed if log level is misspelled, then log4cplus (static library) crashes with the same error as I have wrote earlier. Thanks for suggestions. ---------------------------------------------------------------------- Comment By: Václav Zeman (wilx) Date: 2012-08-27 06:09 Message: I could not reproduce the problem with log4cplus' test cases. But these test cases are using log4cplus as a DLL. Could you try your code with log4cplus as a DLL? Also/alternatively, could you test with the pushToStringMethod() and pushFromStringMethod() calls moved into main()? I suspect this might be an instance of static objects initialization order fiasco problem. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=429074&aid=3560984&group_id=40830 |
From: SourceForge.net <no...@so...> - 2012-09-06 07:52:11
|
Support Requests item #3560984, was opened at 2012-08-23 05:12 Message generated for change (Comment added) made by You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=429074&aid=3560984&group_id=40830 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: v1.0.4 >Status: Closed Priority: 5 Private: No Submitted By: https://www.google.com/accounts () Assigned to: Václav Zeman (wilx) Summary: creating custom log level and setting it from prperty file Initial Comment: Hello, I am trying to create custom log levels but I have faced these problems: 1. I am not able to set custom log level from property file, log4cplus crashes (Getting error: log4cplus:ERROR LoggerImpl::getChainedLogLevel()- No valid LogLevel found); 2. If I set custom log level in my program, then log level in log file is named: UNKNOWN; Info about log4cplus: Using static library Version - 1.0.4 Build system - VisualStudio 2010 (project configuration is Debug) Windows 7 SP1, 64bit Config file: log4cplus.rootLogger=TRACE1, Main log4cplus.appender.Main=log4cplus::RollingFileAppender log4cplus.appender.Main.File=myLogFile.log log4cplus.appender.Main.Append=true log4cplus.appender.Main.MaxFileSize=10MB log4cplus.appender.Main.MaxBackupIndex=50 log4cplus.appender.Main.layout=log4cplus::PatternLayout log4cplus.appender.Main.layout.ConversionPattern=%d | [%-7p] | %-20c | %-20m |%n ---------------------------------------------------------------------- >Comment By: https://www.google.com/accounts () Date: 2012-09-06 00:52 Message: You were right about initialization order problem. When I moved calls you specified to main it worked great. I tested on static library. Thanks for help. ---------------------------------------------------------------------- Comment By: https://www.google.com/accounts () Date: 2012-08-28 06:38 Message: I will try your suggestions next week. Also I have noticed if log level is misspelled, then log4cplus (static library) crashes with the same error as I have wrote earlier. Thanks for suggestions. ---------------------------------------------------------------------- Comment By: Václav Zeman (wilx) Date: 2012-08-27 06:09 Message: I could not reproduce the problem with log4cplus' test cases. But these test cases are using log4cplus as a DLL. Could you try your code with log4cplus as a DLL? Also/alternatively, could you test with the pushToStringMethod() and pushFromStringMethod() calls moved into main()? I suspect this might be an instance of static objects initialization order fiasco problem. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=429074&aid=3560984&group_id=40830 |