log4cplus-devel Mailing List for log4cplus (Page 3)
Logging Framework for C++
Brought to you by:
wilx
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
(2) |
Apr
(2) |
May
(1) |
Jun
|
Jul
|
Aug
(2) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2005 |
Jan
|
Feb
(1) |
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
2006 |
Jan
|
Feb
(1) |
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(3) |
Nov
(7) |
Dec
(15) |
2007 |
Jan
(19) |
Feb
(23) |
Mar
(40) |
Apr
(36) |
May
(18) |
Jun
(8) |
Jul
(10) |
Aug
(18) |
Sep
(18) |
Oct
(4) |
Nov
(1) |
Dec
(4) |
2008 |
Jan
(2) |
Feb
(1) |
Mar
(4) |
Apr
(16) |
May
(17) |
Jun
(15) |
Jul
(23) |
Aug
(7) |
Sep
(2) |
Oct
|
Nov
|
Dec
|
2009 |
Jan
(2) |
Feb
(1) |
Mar
(1) |
Apr
(7) |
May
|
Jun
(5) |
Jul
(2) |
Aug
(9) |
Sep
|
Oct
(4) |
Nov
(6) |
Dec
(4) |
2010 |
Jan
(2) |
Feb
(2) |
Mar
(6) |
Apr
(5) |
May
(2) |
Jun
(13) |
Jul
(5) |
Aug
|
Sep
(2) |
Oct
(2) |
Nov
|
Dec
|
2011 |
Jan
(1) |
Feb
|
Mar
|
Apr
(2) |
May
(2) |
Jun
(11) |
Jul
(1) |
Aug
(4) |
Sep
(5) |
Oct
|
Nov
(4) |
Dec
|
2012 |
Jan
|
Feb
(13) |
Mar
(3) |
Apr
(5) |
May
(18) |
Jun
(22) |
Jul
(11) |
Aug
(25) |
Sep
(56) |
Oct
(1) |
Nov
(28) |
Dec
(3) |
2013 |
Jan
(66) |
Feb
(40) |
Mar
(61) |
Apr
(1) |
May
(45) |
Jun
(30) |
Jul
(30) |
Aug
(46) |
Sep
(23) |
Oct
(43) |
Nov
(95) |
Dec
(27) |
2014 |
Jan
(16) |
Feb
(19) |
Mar
(23) |
Apr
(18) |
May
(22) |
Jun
(12) |
Jul
(15) |
Aug
(16) |
Sep
(30) |
Oct
(10) |
Nov
(10) |
Dec
(5) |
2015 |
Jan
(2) |
Feb
(7) |
Mar
|
Apr
(1) |
May
(10) |
Jun
(3) |
Jul
(1) |
Aug
(5) |
Sep
|
Oct
(6) |
Nov
(2) |
Dec
(15) |
2016 |
Jan
(21) |
Feb
(6) |
Mar
(30) |
Apr
(12) |
May
(11) |
Jun
(4) |
Jul
(2) |
Aug
(7) |
Sep
(13) |
Oct
|
Nov
(6) |
Dec
(8) |
2017 |
Jan
(21) |
Feb
(5) |
Mar
(7) |
Apr
(3) |
May
|
Jun
(4) |
Jul
(18) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
(1) |
Feb
|
Mar
(2) |
Apr
(1) |
May
(4) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
2019 |
Jan
|
Feb
|
Mar
(1) |
Apr
(1) |
May
|
Jun
|
Jul
(4) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
2020 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2021 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
From: Václav H. <wi...@us...> - 2017-06-21 10:46:23
|
- **labels**: --> properties - Description has changed: Diff: ~~~~ --- old +++ new @@ -1,31 +1,38 @@ -Unfortunately fShadowEnvironment doesn't go nice together with fAllowEmptyVars. +Unfortunately `fShadowEnvironment` doesn't go nice together with `fAllowEmptyVars`. Here is the case. My config file contains the line: + +```properties appender.applog.File=${ProgramData}\${logname}-${USERNAME}${optionalSuffix}.log +``` + So I have both Environment Variables and my custom variables which I set in the code. -${OptionalSuffix} is added only if app is run from command line, otherwise I would like to have it empy. -${UserName} I set manually in the code only when app is run as a services. -${logname} is my log name set in the code -${ProgramData} is an environment variable I don't touch in the code + +- `${OptionalSuffix}` is added only if app is run from command line, otherwise I would like to have it empy. +- `${UserName}` I set manually in the code only when app is run as a services. +- `${logname}` is my log name set in the code +- `${ProgramData}` is an environment variable I don't touch in the code + I have 3 options: -a) use fShadowEnvironment -Then I will have correctly resolved all variables but when ${optionalSuffix} is empty then I will end up with the log name: -C:\ProgramData\MyLogName-janekvogel${optionalSuffix}.log -b) fAllowEmptyVars: -It will try to read every thing from System (will skip all custom variables). +1. use `fShadowEnvironment` -c) fShadowEnvironment | fAllowEmptyVars -Which also doesn't work. As it will never read system variables. + Then I will have correctly resolved all variables but when ${optionalSuffix} is empty then I will end up with the log name: `C:\ProgramData\MyLogName-janekvogel${optionalSuffix}.log` -I think the best approach would be just to remove the not resolved property. So in fShadowEnvironment ${optionalSuffix} should be replaced with empty string if optionalSuffix is not found neither in properties nor in system variables. +2. `fAllowEmptyVars` + It will try to read every thing from System (will skip all custom variables). +3. `fShadowEnvironment | fAllowEmptyVars` + Which also doesn't work. As it will never read system variables. + +I think the best approach would be just to remove the not resolved property. So in `fShadowEnvironment` `${optionalSuffix}` should be replaced with empty string if optionalSuffix is found neither in properties nor in system variables. + +```cpp else // Nothing has been subtituted, just move beyond the // unexpanded variable. // TODO: replace unresolved property with empty string i = var_end + DELIM_STOP_LEN; -~~~ if (shadow_env) replacement = props.getProperty (key); if (! shadow_env || (! empty_vars && replacement.empty ())) @@ -48,4 +55,4 @@ // Nothing has been subtituted, just move beyond the // unexpanded variable. i = var_end + DELIM_STOP_LEN; -~~~ +``` ~~~~ - **assigned_to**: Václav Haisman --- ** [bugs:#342] fShadowEnvironment does not allow for optional variables (which can be empty)** **Status:** open **Group:** v1.1.3 **Labels:** properties **Created:** Tue Jun 20, 2017 06:57 PM UTC by Jan Vogelgesang **Last Updated:** Wed Jun 21, 2017 10:22 AM UTC **Owner:** Václav Haisman Unfortunately `fShadowEnvironment` doesn't go nice together with `fAllowEmptyVars`. Here is the case. My config file contains the line: ```properties appender.applog.File=${ProgramData}\${logname}-${USERNAME}${optionalSuffix}.log ``` So I have both Environment Variables and my custom variables which I set in the code. - `${OptionalSuffix}` is added only if app is run from command line, otherwise I would like to have it empy. - `${UserName}` I set manually in the code only when app is run as a services. - `${logname}` is my log name set in the code - `${ProgramData}` is an environment variable I don't touch in the code I have 3 options: 1. use `fShadowEnvironment` Then I will have correctly resolved all variables but when ${optionalSuffix} is empty then I will end up with the log name: `C:\ProgramData\MyLogName-janekvogel${optionalSuffix}.log` 2. `fAllowEmptyVars` It will try to read every thing from System (will skip all custom variables). 3. `fShadowEnvironment | fAllowEmptyVars` Which also doesn't work. As it will never read system variables. I think the best approach would be just to remove the not resolved property. So in `fShadowEnvironment` `${optionalSuffix}` should be replaced with empty string if optionalSuffix is found neither in properties nor in system variables. ```cpp else // Nothing has been subtituted, just move beyond the // unexpanded variable. // TODO: replace unresolved property with empty string i = var_end + DELIM_STOP_LEN; if (shadow_env) replacement = props.getProperty (key); if (! shadow_env || (! empty_vars && replacement.empty ())) internal::get_env_var (replacement, key); if (empty_vars || ! replacement.empty ()) { // Substitute the variable with its value in place. pattern.replace (var_start, var_end - var_start + DELIM_STOP_LEN, replacement); changed = true; if (rec_exp) // Retry expansion on the same spot. continue; else // Move beyond the just substituted part. i = var_start + replacement.size (); } else // Nothing has been subtituted, just move beyond the // unexpanded variable. i = var_end + DELIM_STOP_LEN; ``` --- Sent from sourceforge.net because log...@li... is subscribed to https://sourceforge.net/p/log4cplus/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/log4cplus/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Jan V. <jan...@us...> - 2017-06-21 10:22:44
|
I think the code should be changed to something like: bool propertyExist = props.exists(key); if (propertyExist) { replacement = props.getProperty(key); } // if shadowing is not allowed or a property was not registered then try to look up in envrionment variables if (!shadow_env || !propertyExist) { internal::get_env_var(replacement, key); } // if empty values allowed or value is not empty then perform remplacement if (empty_vars || !replacement.empty ()) { .... --- ** [bugs:#342] fShadowEnvironment does not allow for optional variables (which can be empty)** **Status:** open **Group:** v1.1.3 **Created:** Tue Jun 20, 2017 06:57 PM UTC by Jan Vogelgesang **Last Updated:** Tue Jun 20, 2017 07:06 PM UTC **Owner:** nobody Unfortunately fShadowEnvironment doesn't go nice together with fAllowEmptyVars. Here is the case. My config file contains the line: appender.applog.File=${ProgramData}\${logname}-${USERNAME}${optionalSuffix}.log So I have both Environment Variables and my custom variables which I set in the code. ${OptionalSuffix} is added only if app is run from command line, otherwise I would like to have it empy. ${UserName} I set manually in the code only when app is run as a services. ${logname} is my log name set in the code ${ProgramData} is an environment variable I don't touch in the code I have 3 options: a) use fShadowEnvironment Then I will have correctly resolved all variables but when ${optionalSuffix} is empty then I will end up with the log name: C:\ProgramData\MyLogName-janekvogel${optionalSuffix}.log b) fAllowEmptyVars: It will try to read every thing from System (will skip all custom variables). c) fShadowEnvironment | fAllowEmptyVars Which also doesn't work. As it will never read system variables. I think the best approach would be just to remove the not resolved property. So in fShadowEnvironment ${optionalSuffix} should be replaced with empty string if optionalSuffix is not found neither in properties nor in system variables. else // Nothing has been subtituted, just move beyond the // unexpanded variable. // TODO: replace unresolved property with empty string i = var_end + DELIM_STOP_LEN; ~~~ if (shadow_env) replacement = props.getProperty (key); if (! shadow_env || (! empty_vars && replacement.empty ())) internal::get_env_var (replacement, key); if (empty_vars || ! replacement.empty ()) { // Substitute the variable with its value in place. pattern.replace (var_start, var_end - var_start + DELIM_STOP_LEN, replacement); changed = true; if (rec_exp) // Retry expansion on the same spot. continue; else // Move beyond the just substituted part. i = var_start + replacement.size (); } else // Nothing has been subtituted, just move beyond the // unexpanded variable. i = var_end + DELIM_STOP_LEN; ~~~ --- Sent from sourceforge.net because log...@li... is subscribed to https://sourceforge.net/p/log4cplus/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/log4cplus/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Jan V. <jan...@us...> - 2017-06-20 18:57:10
|
--- ** [bugs:#342] fShadowEnvironment does not allow for optional variables (which can be empty)** **Status:** open **Group:** v1.1.3 **Created:** Tue Jun 20, 2017 06:57 PM UTC by Jan Vogelgesang **Last Updated:** Tue Jun 20, 2017 06:57 PM UTC **Owner:** nobody Unfortunately fShadowEnvironment doesn't go nice together with fAllowEmptyVars. Here is the case. My config file contains the line: appender.applog.File=${ProgramData}\${logname}-${USERNAME}${optionalSuffix}.log So I have both Environment Variables and my custom variables which I set in the code. ${OptionalSuffix} is added only if app is run from command line, otherwise I would like to have it empy. ${UserName} I set manually in the code only when app is run as a services. ${logname} is my log name set in the code ${ProgramData} is an environment variable I don't touch in the code I have 3 options: a) use fShadowEnvironment Then I will have correctly resolved all variables but when ${optionalSuffix} is empty then I will end up with the log name: C:\ProgramData\MyLogName-janekvogel${optionalSuffix}.log b) fAllowEmptyVars: It will try to read every thing from System (will skip all custom variables). c) fShadowEnvironment | fAllowEmptyVars Which also doesn't work. As it will never read system variables. I think the best approach would be just to remove the not resolved property. So in fShadowEnvironment ${optionalSuffix} should be replaced with empty string if optionalSuffix is not found neither in properties nor in system variables. else // Nothing has been subtituted, just move beyond the // unexpanded variable. // TODO: replace unresolved property with empty string i = var_end + DELIM_STOP_LEN; ~~~ if (shadow_env) replacement = props.getProperty (key); if (! shadow_env || (! empty_vars && replacement.empty ())) internal::get_env_var (replacement, key); if (empty_vars || ! replacement.empty ()) { // Substitute the variable with its value in place. pattern.replace (var_start, var_end - var_start + DELIM_STOP_LEN, replacement); changed = true; if (rec_exp) // Retry expansion on the same spot. continue; else // Move beyond the just substituted part. i = var_start + replacement.size (); } else // Nothing has been subtituted, just move beyond the // unexpanded variable. i = var_end + DELIM_STOP_LEN; ~~~ --- Sent from sourceforge.net because log...@li... is subscribed to https://sourceforge.net/p/log4cplus/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/log4cplus/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Václav H. <wi...@us...> - 2017-04-07 09:33:38
|
- **status**: open --> closed - **assigned_to**: Václav Haisman --- ** [bugs:#341] Exception on app exit** **Status:** closed **Group:** v1.2.x **Labels:** appender SharedAppenderPtr **Created:** Fri Apr 07, 2017 09:08 AM UTC by BTree **Last Updated:** Fri Apr 07, 2017 09:33 AM UTC **Owner:** Václav Haisman I have tested log4cplus in win32 app, ~~~ MainAppWindow::MainAppWindow() { ... log4cplus::initialize(); log4cplus::Logger logger = log4cplus::Logger::getInstance(LOG4CPLUS_TEXT("SmartSong")); SharedAppenderPtr appender_ptr(new Win32DebugAppender()); logger.addAppender(appender_ptr); ... } ~~~ When app exit, it throw exception in following. ~~~ SharedObject::removeReference() { ... if (LOG4CPLUS_UNLIKELY (destroy)) delete this; } ~~~ --- Sent from sourceforge.net because log...@li... is subscribed to https://sourceforge.net/p/log4cplus/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/log4cplus/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Václav H. <wi...@us...> - 2017-04-07 09:33:15
|
I am closing this as a duplicate of [Exception on app exit · Issue #239 · log4cplus/log4cplus](https://github.com/log4cplus/log4cplus/issues/239) --- ** [bugs:#341] Exception on app exit** **Status:** open **Group:** v1.2.x **Labels:** appender SharedAppenderPtr **Created:** Fri Apr 07, 2017 09:08 AM UTC by BTree **Last Updated:** Fri Apr 07, 2017 09:08 AM UTC **Owner:** nobody I have tested log4cplus in win32 app, ~~~ MainAppWindow::MainAppWindow() { ... log4cplus::initialize(); log4cplus::Logger logger = log4cplus::Logger::getInstance(LOG4CPLUS_TEXT("SmartSong")); SharedAppenderPtr appender_ptr(new Win32DebugAppender()); logger.addAppender(appender_ptr); ... } ~~~ When app exit, it throw exception in following. ~~~ SharedObject::removeReference() { ... if (LOG4CPLUS_UNLIKELY (destroy)) delete this; } ~~~ --- Sent from sourceforge.net because log...@li... is subscribed to https://sourceforge.net/p/log4cplus/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/log4cplus/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: BTree <tre...@us...> - 2017-04-07 09:08:11
|
--- ** [bugs:#341] Exception on app exit** **Status:** open **Group:** v1.2.x **Labels:** appender SharedAppenderPtr **Created:** Fri Apr 07, 2017 09:08 AM UTC by BTree **Last Updated:** Fri Apr 07, 2017 09:08 AM UTC **Owner:** nobody I have tested log4cplus in win32 app, ~~~ MainAppWindow::MainAppWindow() { ... log4cplus::initialize(); log4cplus::Logger logger = log4cplus::Logger::getInstance(LOG4CPLUS_TEXT("SmartSong")); SharedAppenderPtr appender_ptr(new Win32DebugAppender()); logger.addAppender(appender_ptr); ... } ~~~ When app exit, it throw exception in following. ~~~ SharedObject::removeReference() { ... if (LOG4CPLUS_UNLIKELY (destroy)) delete this; } ~~~ --- Sent from sourceforge.net because log...@li... is subscribed to https://sourceforge.net/p/log4cplus/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/log4cplus/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Jiang S. <dao...@us...> - 2017-03-27 09:55:38
|
--- ** [bugs:#340] How can I send log from log4cplus to log4j** **Status:** open **Group:** v1.2.x **Labels:** log4j **Created:** Mon Mar 27, 2017 09:55 AM UTC by Jiang Sihui **Last Updated:** Mon Mar 27, 2017 09:55 AM UTC **Owner:** Václav Haisman Hello, I am engaging in a project which is developed with Java and C++. I use log4cplus to manage C++ log, and log4j to manage Java log. I want to send C++ log to Java by using log4cplus. How can I do it. Before, I used "log4jUdpAppender" as https://sourceforge.net/p/log4cplus/bugs/276/. However, it didn't work. log4j can not receive any packets. Is there any tip ? --- Sent from sourceforge.net because log...@li... is subscribed to https://sourceforge.net/p/log4cplus/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/log4cplus/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Alexandr G. <ad...@us...> - 2017-03-04 06:27:33
|
Please advise working version for insertion it into COM-objects? --- ** [bugs:#339] Hangs in log4cplus::Initializer initializer;** **Status:** open **Group:** v1.2.0 **Created:** Fri Mar 03, 2017 08:39 AM UTC by Alexandr Gordienko **Last Updated:** Fri Mar 03, 2017 09:14 AM UTC **Owner:** Václav Haisman Used log4cplus-2.0.0-rc1. log4cplus added static library to visio extension, hangs in first line log4cplus::Initializer initializer; --- Sent from sourceforge.net because log...@li... is subscribed to https://sourceforge.net/p/log4cplus/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/log4cplus/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Václav H. <wi...@us...> - 2017-03-03 09:45:02
|
You are hitting a limitation of the C++11 mutexes, etc., support in Visual Studio which are used during the initialization. Where you initialize it is up to you but it has to be during normal operation. --- ** [bugs:#339] Hangs in log4cplus::Initializer initializer;** **Status:** open **Group:** v1.2.0 **Created:** Fri Mar 03, 2017 08:39 AM UTC by Alexandr Gordienko **Last Updated:** Fri Mar 03, 2017 09:14 AM UTC **Owner:** Václav Haisman Used log4cplus-2.0.0-rc1. log4cplus added static library to visio extension, hangs in first line log4cplus::Initializer initializer; --- Sent from sourceforge.net because log...@li... is subscribed to https://sourceforge.net/p/log4cplus/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/log4cplus/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Alexandr G. <ad...@us...> - 2017-03-03 09:14:27
|
Calling from constructor global object. Where should I initialize log4cplus to insert it into the COM object? --- ** [bugs:#339] Hangs in log4cplus::Initializer initializer;** **Status:** open **Group:** v1.2.0 **Created:** Fri Mar 03, 2017 08:39 AM UTC by Alexandr Gordienko **Last Updated:** Fri Mar 03, 2017 08:44 AM UTC **Owner:** Václav Haisman Used log4cplus-2.0.0-rc1. log4cplus added static library to visio extension, hangs in first line log4cplus::Initializer initializer; --- Sent from sourceforge.net because log...@li... is subscribed to https://sourceforge.net/p/log4cplus/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/log4cplus/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Václav H. <wi...@us...> - 2017-03-03 08:44:46
|
- **assigned_to**: Václav Haisman --- ** [bugs:#339] Hangs in log4cplus::Initializer initializer;** **Status:** open **Group:** v1.2.0 **Created:** Fri Mar 03, 2017 08:39 AM UTC by Alexandr Gordienko **Last Updated:** Fri Mar 03, 2017 08:44 AM UTC **Owner:** Václav Haisman Used log4cplus-2.0.0-rc1. log4cplus added static library to visio extension, hangs in first line log4cplus::Initializer initializer; --- Sent from sourceforge.net because log...@li... is subscribed to https://sourceforge.net/p/log4cplus/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/log4cplus/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Václav H. <wi...@us...> - 2017-03-03 08:44:34
|
Can you provide a call stack? At what point in your code are you instantiating `log4cplus::Initializer`, if you are doing it from inside `DllMain()` or from constructor of global object then you are out of luck. Such use is not supported. --- ** [bugs:#339] Hangs in log4cplus::Initializer initializer;** **Status:** open **Group:** v1.2.0 **Created:** Fri Mar 03, 2017 08:39 AM UTC by Alexandr Gordienko **Last Updated:** Fri Mar 03, 2017 08:39 AM UTC **Owner:** nobody Used log4cplus-2.0.0-rc1. log4cplus added static library to visio extension, hangs in first line log4cplus::Initializer initializer; --- Sent from sourceforge.net because log...@li... is subscribed to https://sourceforge.net/p/log4cplus/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/log4cplus/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Alexandr G. <ad...@us...> - 2017-03-03 08:39:38
|
--- ** [bugs:#339] Hangs in log4cplus::Initializer initializer;** **Status:** open **Group:** v1.2.0 **Created:** Fri Mar 03, 2017 08:39 AM UTC by Alexandr Gordienko **Last Updated:** Fri Mar 03, 2017 08:39 AM UTC **Owner:** nobody Used log4cplus-2.0.0-rc1. log4cplus added static library to visio extension, hangs in first line log4cplus::Initializer initializer; --- Sent from sourceforge.net because log...@li... is subscribed to https://sourceforge.net/p/log4cplus/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/log4cplus/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Václav H. <vha...@gm...> - 2017-02-28 09:43:14
|
On 28 February 2017 at 10:21, Matej Sekoranja <mat...@gm...> wrote: Hi all, > > I am searching for TCP based remote logging (log4j format) that is not > lossy, e.g. it does not simply drop logs if server is unavailable/buffers > full. As a fallback, another appender can be used. > In addition, it would be nice to have logs sent over the wire in bulk (not > one by one). > Anything like this exists? Or needs to be implemented? > I am personally not aware of any such implementation. Log4cplus only has limited Log4jUdpAppender. -- VH |
From: Matej S. <mat...@gm...> - 2017-02-28 09:21:42
|
Hi all, I am searching for TCP based remote logging (log4j format) that is not lossy, e.g. it does not simply drop logs if server is unavailable/buffers full. As a fallback, another appender can be used. In addition, it would be nice to have logs sent over the wire in bulk (not one by one). Anything like this exists? Or needs to be implemented? Regards, Matej |
From: Václav H. <vha...@gm...> - 2017-02-01 22:12:42
|
I have released log4cplus 2.0.0-RC1 <https://sourceforge.net/projects/log4cplus/files/log4cplus-stable/2.0.0/>. It is the first C++11 based release. * *IMPORTANT*: Implementation language is now C++11. OS specific implementations have been replaced by C++11 facilities wherever possible. This lowers complexity of the library and improves maintainability but it also brings limitations to when the library can be used. Specifically, the library should not be used before |main()| is entered and after |main()| is left. Even more specifically, the library should not be used during global objects construction and destruction. * log4cplus uses Catch unit testing framework and hand unit tests. * log4cplus supports IPv6. * Autotools based build system is now partially generated from templates by the Autogen tool. * Autotools based build system can build both |wchar_t| and plain |char| variants at once. -- VH |
From: Václav H. <wi...@us...> - 2017-02-01 09:55:13
|
- **status**: open --> closed --- ** [bugs:#332] AsyncAppender/RollingFileAppender combination error.** **Status:** closed **Group:** v1.2.0 **Created:** Mon Jun 13, 2016 12:57 PM UTC by Jakob Krogh Bodilsen **Last Updated:** Wed Feb 01, 2017 09:25 AM UTC **Owner:** Václav Haisman We are using AsyncAppender combined with RollingFileAppender in the following manner: ~~~ log4cplus.appender.logfile=log4cplus::AsyncAppender log4cplus.appender.logfile.QueueLimit=10000 log4cplus.appender.logfile.Appender =log4cplus::RollingFileAppender log4cplus.appender.logfile.Appender.layout=log4cplus::PatternLayout log4cplus.appender.logfile.Appender.BufferSize=10000 log4cplus.appender.logfile.Appender.ImmediateFlush=true log4cplus.appender.logfile.Appender.File=d:/wpslog/hppp/Core.log.txt log4cplus.appender.logfile.Appender.DatePattern='.'yyyy-MM-dd log4cplus.appender.logfile.Appender.MaxFileSize=250KB log4cplus.appender.logfile.Appender.MaxBackupIndex=10 log4cplus.appender.logfile.Appender.layout.ConversionPattern=%D{%Y-%m-%d %H:%M:%S.%q} [%t] %-5p %c - %m%n ~~~ The same process logs to several appenders. Several threads in this process logs to the appender above, but only this one process uses the appender. After processstart the rollingfile logic works as expected. After having modified the log properties file (and empty line is enough), the txt log file is never renamed to txt.1, however the file is still cleared when reaching filesize limit and logging continues from scratch. Furthermore the renaming/deletion of any remaining txt.\* files are still done, so that at some point only the .txt file remains. Some debug log from log4cplus immedately after saving the log.properties file: ``` log4cplus: Queue thread started. log4cplus: Just opened file: d:/wpslog/hppp/Core.log.txt log4cplus: Queue thread started. log4cplus: Just opened file: d:/wpslog/hppp/timeStatisticLogFile.log.txt log4cplus: Queue thread started. log4cplus: Entering ConsoleAppender::close().. log4cplus: Destroying appender named [stdout]. log4cplus: Destroying appender named [nteventlog]. log4cplus: Renamed file d:/wpslog/hppp/Core.log.txt.2 to d:/wpslog/hppp/Core.log.txt.3 log4cplus: Renamed file d:/wpslog/hppp/Core.log.txt.1 to d:/wpslog/hppp/Core.log.txt.2 log4cplus: Renaming file d:/wpslog/hppp/Core.log.txt to d:/wpslog/hppp/Core.log.txt.1 log4cplus:ERROR Failed to rename file from d:/wpslog/hppp/Core.log.txt to d:/wps log/hppp/Core.log.txt.1; error 13 log4cplus: Just opened file: d:/wpslog/hppp/Core.log.txt ``` The behaviour is consistent. If changing the appender to be RollingFileAppender only (without AsyncAppender) the issue dissappears. Any help is appreciated. --- Sent from sourceforge.net because log...@li... is subscribed to https://sourceforge.net/p/log4cplus/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/log4cplus/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Jan M. <jmo...@us...> - 2017-02-01 09:25:57
|
I have now tested with 1.2.1 RC1 and are no longer able to recreate the problem. Thanks --- ** [bugs:#332] AsyncAppender/RollingFileAppender combination error.** **Status:** open **Group:** v1.2.0 **Created:** Mon Jun 13, 2016 12:57 PM UTC by Jakob Krogh Bodilsen **Last Updated:** Mon Jan 30, 2017 02:53 PM UTC **Owner:** Václav Haisman We are using AsyncAppender combined with RollingFileAppender in the following manner: ~~~ log4cplus.appender.logfile=log4cplus::AsyncAppender log4cplus.appender.logfile.QueueLimit=10000 log4cplus.appender.logfile.Appender =log4cplus::RollingFileAppender log4cplus.appender.logfile.Appender.layout=log4cplus::PatternLayout log4cplus.appender.logfile.Appender.BufferSize=10000 log4cplus.appender.logfile.Appender.ImmediateFlush=true log4cplus.appender.logfile.Appender.File=d:/wpslog/hppp/Core.log.txt log4cplus.appender.logfile.Appender.DatePattern='.'yyyy-MM-dd log4cplus.appender.logfile.Appender.MaxFileSize=250KB log4cplus.appender.logfile.Appender.MaxBackupIndex=10 log4cplus.appender.logfile.Appender.layout.ConversionPattern=%D{%Y-%m-%d %H:%M:%S.%q} [%t] %-5p %c - %m%n ~~~ The same process logs to several appenders. Several threads in this process logs to the appender above, but only this one process uses the appender. After processstart the rollingfile logic works as expected. After having modified the log properties file (and empty line is enough), the txt log file is never renamed to txt.1, however the file is still cleared when reaching filesize limit and logging continues from scratch. Furthermore the renaming/deletion of any remaining txt.\* files are still done, so that at some point only the .txt file remains. Some debug log from log4cplus immedately after saving the log.properties file: ``` log4cplus: Queue thread started. log4cplus: Just opened file: d:/wpslog/hppp/Core.log.txt log4cplus: Queue thread started. log4cplus: Just opened file: d:/wpslog/hppp/timeStatisticLogFile.log.txt log4cplus: Queue thread started. log4cplus: Entering ConsoleAppender::close().. log4cplus: Destroying appender named [stdout]. log4cplus: Destroying appender named [nteventlog]. log4cplus: Renamed file d:/wpslog/hppp/Core.log.txt.2 to d:/wpslog/hppp/Core.log.txt.3 log4cplus: Renamed file d:/wpslog/hppp/Core.log.txt.1 to d:/wpslog/hppp/Core.log.txt.2 log4cplus: Renaming file d:/wpslog/hppp/Core.log.txt to d:/wpslog/hppp/Core.log.txt.1 log4cplus:ERROR Failed to rename file from d:/wpslog/hppp/Core.log.txt to d:/wps log/hppp/Core.log.txt.1; error 13 log4cplus: Just opened file: d:/wpslog/hppp/Core.log.txt ``` The behaviour is consistent. If changing the appender to be RollingFileAppender only (without AsyncAppender) the issue dissappears. Any help is appreciated. --- Sent from sourceforge.net because log...@li... is subscribed to https://sourceforge.net/p/log4cplus/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/log4cplus/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Václav H. <wi...@us...> - 2017-01-30 21:07:32
|
- **labels**: --> bug, threads - **status**: open --> closed - **assigned_to**: Václav Haisman - **Comment**: I think this is fixed by handling the `EINTR`. --- ** [bugs:#334] this may be a rarely occurred bug of AsyncAppender** **Status:** closed **Group:** v1.1.3 **Labels:** bug threads **Created:** Fri Sep 02, 2016 12:20 PM UTC by owenliang **Last Updated:** Sun Jan 29, 2017 10:09 PM UTC **Owner:** Václav Haisman sorry for my poor english first... the code is in /src/queue.cxx, the function "get_events", ~~~{.cpp} else if (((EXIT | QUEUE) & flags) == (EXIT | QUEUE)) { assert (! queue.empty ()); queue.clear (); flags &= ~QUEUE; ev_consumer.reset (); sem.unlock (); // look at here ret_flags = flags; break; } ~~~ the story goes like this: 1, all threads that is calling "asyncAppender::append()" hang on the Semaphore of queue, because the consumer thread is doing a heavy IO outputing and then has no time to process the queue full of events. 2, one of these threads' sem_wait is interrupt by a signal, then AsyncAppender::append() will call queue::signal_eixt(false) to terminal the consumer thread. (flags=EXIT|QUEUE) 3, consumer thread finish IO and loop again, then will go into the code above in the next loop. 4, sem.unlock() is just called once, and then the consumer thread exit. 5, all the other threads which is hanging on Semaphore will never exit. take a look && help me , thanks. --- Sent from sourceforge.net because log...@li... is subscribed to https://sourceforge.net/p/log4cplus/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/log4cplus/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Václav H. <wi...@us...> - 2017-01-30 21:05:48
|
- **status**: open --> closed - **Comment**: I think this is now fully fixed. --- ** [bugs:#333] AsyncAppender leads to loss logs, when server terminated normally.** **Status:** closed **Group:** v1.2.0 **Labels:** v1.2.0 Appender **Created:** Fri Aug 19, 2016 01:43 AM UTC by Justin Sage **Last Updated:** Sun Aug 21, 2016 12:51 PM UTC **Owner:** Václav Haisman A bug in Asynchronous Log: We are using AsyncAppender to record our log on CentOS-6.3, and we found a fatal bug. when our server terminated normally, we lost a lot of log. It's because that when AsyncAppender call its close function, it doesn't call the other Appenders' close function. As a result, their file stream isn't close explicitly and a lot of logs aren't flushed to disk. Our log configure is as follow: ~~~{.properties} log4cplus.logger.global = INFO, AA log4cplus.appender.AA=log4cplus::AsyncAppender log4cplus.appender.AA.QueueLimit=10000 log4cplus.appender.AA.Appender=log4cplus::DailyRollingFileAppender log4cplus.appender.AA.Appender.Schedule=HOURLY log4cplus.appender.AA.Appender.Threshold = INFO log4cplus.appender.AA.Appender.DatePattern=%Y-%m-%d-%H log4cplus.appender.AA.Appender.File=./logger_test.log log4cplus.appender.AA.Appender.ImmediateFlush=false log4cplus.appender.AA.Appender.MaxFileSize=1000MB log4cplus.appender.AA.Appender.MaxBackupIndex=100 log4cplus.appender.AA.Appender.Append=true log4cplus.appender.AA.Appender.layout=log4cplus::PatternLayout log4cplus.appender.AA.Appender.layout.ConversionPattern=%D{%Y-%m-%d %H:%M:%S,%Q} [%t] %-5p %m%n ~~~ We tried to set `log4cplus.appender.AA.Appender.ImmediateFlush=true`, and it works. But it's bad for I/O performence of system. We have a better solution, and it works well. Just call `removeAllAppenders()` function at the end of `AsyncAppender::close()`. It will ensure all logs are flushed to the disk when server terminates. ~~~{.cpp} void AsyncAppender::close () { unsigned ret = queue->signal_exit (); if (ret & (thread::Queue::ERROR_BIT | thread::Queue::ERROR_AFTER)) getErrorHandler ()->error ( LOG4CPLUS_TEXT ("Error in AsyncAppender::close")); queue_thread->join (); removeAllAppenders(); } ~~~ --- Sent from sourceforge.net because log...@li... is subscribed to https://sourceforge.net/p/log4cplus/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/log4cplus/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Václav H. <wi...@us...> - 2017-01-30 21:00:19
|
- **status**: open --> closed --- ** [bugs:#297] Add Support for Threshold and Filters to AsyncAppender** **Status:** closed **Group:** v1.1.3 **Created:** Wed Mar 12, 2014 10:46 AM UTC by Markus von Arx **Last Updated:** Mon Jan 30, 2017 08:59 PM UTC **Owner:** Václav Haisman * I'd like AsyncAppender to support "Threshold" and "filters." configuration via property file configuration like any other appenders. * The class already supports threshold and filters, but it cannot be configured through property files as the `AsyncAppender::AsyncAppender (helpers::Properties const & props)` does not read those values from the properties configuration file. * also see mailing list: https://sourceforge.net/p/log4cplus/mailman/message/32086528/ --- Sent from sourceforge.net because log...@li... is subscribed to https://sourceforge.net/p/log4cplus/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/log4cplus/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Václav H. <wi...@us...> - 2017-01-30 20:59:54
|
Well, it took me only 3 years to commit [the most trivila change that enables this](https://github.com/wilx/log4cplus/commit/d0050220f4abc47256d6b5530960895cca90ea70). --- ** [bugs:#297] Add Support for Threshold and Filters to AsyncAppender** **Status:** open **Group:** v1.1.3 **Created:** Wed Mar 12, 2014 10:46 AM UTC by Markus von Arx **Last Updated:** Mon Jan 30, 2017 08:28 PM UTC **Owner:** Václav Haisman * I'd like AsyncAppender to support "Threshold" and "filters." configuration via property file configuration like any other appenders. * The class already supports threshold and filters, but it cannot be configured through property files as the `AsyncAppender::AsyncAppender (helpers::Properties const & props)` does not read those values from the properties configuration file. * also see mailing list: https://sourceforge.net/p/log4cplus/mailman/message/32086528/ --- Sent from sourceforge.net because log...@li... is subscribed to https://sourceforge.net/p/log4cplus/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/log4cplus/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Václav H. <wi...@us...> - 2017-01-30 20:28:48
|
- Description has changed: Diff: ~~~~ --- old +++ new @@ -1,3 +1,3 @@ * I'd like AsyncAppender to support "Threshold" and "filters." configuration via property file configuration like any other appenders. -* The class already supports threshold and filters, but it cannot be configured through property files as the [AsyncAppender::AsyncAppender (helpers::Properties const & props)] does not read those values from the properties configuration file. +* The class already supports threshold and filters, but it cannot be configured through property files as the `AsyncAppender::AsyncAppender (helpers::Properties const & props)` does not read those values from the properties configuration file. * also see mailing list: https://sourceforge.net/p/log4cplus/mailman/message/32086528/ ~~~~ --- ** [bugs:#297] Add Support for Threshold and Filters to AsyncAppender** **Status:** open **Group:** v1.1.3 **Created:** Wed Mar 12, 2014 10:46 AM UTC by Markus von Arx **Last Updated:** Wed Mar 12, 2014 10:46 AM UTC **Owner:** Václav Haisman * I'd like AsyncAppender to support "Threshold" and "filters." configuration via property file configuration like any other appenders. * The class already supports threshold and filters, but it cannot be configured through property files as the `AsyncAppender::AsyncAppender (helpers::Properties const & props)` does not read those values from the properties configuration file. * also see mailing list: https://sourceforge.net/p/log4cplus/mailman/message/32086528/ --- Sent from sourceforge.net because log...@li... is subscribed to https://sourceforge.net/p/log4cplus/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/log4cplus/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Václav H. <wi...@us...> - 2017-01-30 20:22:06
|
- **labels**: socket --> socket, v1.2.x - **status**: open --> wont-fix --- ** [bugs:#318] socket copy operator closes the socket** **Status:** wont-fix **Group:** v1.2.x **Labels:** socket v1.2.x **Created:** Sun May 31, 2015 08:14 AM UTC by Alexis Wilke **Last Updated:** Mon Jan 30, 2017 08:21 PM UTC **Owner:** Václav Haisman **Attachments:** - [0002-log4cplus-1.2.0-rc3-socket-copy-operator.patch](https://sourceforge.net/p/log4cplus/bugs/318/attachment/0002-log4cplus-1.2.0-rc3-socket-copy-operator.patch) (262 Bytes; text/x-patch) As I'm working on the simpleserver to make it work properly (especially, so it does not leak all the ClientThread objects--this will be another issue), I noticed that the copy constructor properly transferred a socket, whereas, the copy assignment closes the socket! So if I do this it works as expected: Socket s(rhs); // rhs transferred to s (now rhs is considered closed) Whereas, doing this closes the socket: Socket s; s = rhs; // s is a closed socket (So is rhs) I think that in both cases we should expect the same behavior. There is the function that does it wrong. I suggest to remove the call to the close() function: AbstractSocket& AbstractSocket::operator=(const AbstractSocket& rhs) { if(&rhs != this) { close(); // <-- this should not happen! copy(rhs); } return *this; } I'm attaching a patch. --- Sent from sourceforge.net because log...@li... is subscribed to https://sourceforge.net/p/log4cplus/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/log4cplus/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Václav H. <wi...@us...> - 2017-01-30 20:21:15
|
The problem here is that historically, `Socket s(rhs)` would move data from `rhs` to `s`. This is not good but I am not inclined to change this. This is fixed on master branch by proper implementation of move constructor and move assignment operator. Thereofre I am closing this as wront-fix for 1.2.x branch. --- ** [bugs:#318] socket copy operator closes the socket** **Status:** open **Group:** v1.2.x **Labels:** socket **Created:** Sun May 31, 2015 08:14 AM UTC by Alexis Wilke **Last Updated:** Sun May 31, 2015 09:02 AM UTC **Owner:** Václav Haisman **Attachments:** - [0002-log4cplus-1.2.0-rc3-socket-copy-operator.patch](https://sourceforge.net/p/log4cplus/bugs/318/attachment/0002-log4cplus-1.2.0-rc3-socket-copy-operator.patch) (262 Bytes; text/x-patch) As I'm working on the simpleserver to make it work properly (especially, so it does not leak all the ClientThread objects--this will be another issue), I noticed that the copy constructor properly transferred a socket, whereas, the copy assignment closes the socket! So if I do this it works as expected: Socket s(rhs); // rhs transferred to s (now rhs is considered closed) Whereas, doing this closes the socket: Socket s; s = rhs; // s is a closed socket (So is rhs) I think that in both cases we should expect the same behavior. There is the function that does it wrong. I suggest to remove the call to the close() function: AbstractSocket& AbstractSocket::operator=(const AbstractSocket& rhs) { if(&rhs != this) { close(); // <-- this should not happen! copy(rhs); } return *this; } I'm attaching a patch. --- Sent from sourceforge.net because log...@li... is subscribed to https://sourceforge.net/p/log4cplus/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/log4cplus/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |