<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to bugs</title><link href="https://sourceforge.net/p/log4c/bugs/" rel="alternate"/><link href="https://sourceforge.net/p/log4c/bugs/feed.atom" rel="self"/><id>https://sourceforge.net/p/log4c/bugs/</id><updated>2015-05-10T20:36:45.445000Z</updated><subtitle>Recent changes to bugs</subtitle><entry><title>document appender with type "rollingfile"</title><link href="https://sourceforge.net/p/log4c/bugs/27/" rel="alternate"/><published>2015-05-10T20:36:45.445000Z</published><updated>2015-05-10T20:36:45.445000Z</updated><author><name>Kalle Richter</name><uri>https://sourceforge.net/u/krichter722/</uri></author><id>https://sourceforge.nete348942905029341f326bcb1c5503f25942e417d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;It is unclear who's responsible for creating files and directories referenced in the log4crc configuration file. In the 1.2.4 tarball running the example project with the appender &lt;code&gt;myrollingfileappender&lt;/code&gt; doesn't produce any log files in the &lt;code&gt;examples&lt;/code&gt; directory. Is that intended or a bug? Please clarify (not necessarily here, but in the docs).&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>#21 Log4c printing date entries in  GMT not localtime.</title><link href="https://sourceforge.net/p/log4c/bugs/21/?limit=25#21dc" rel="alternate"/><published>2013-10-05T08:00:36.485000Z</published><updated>2013-10-05T08:00:36.485000Z</updated><author><name>František Dvořák</name><uri>https://sourceforge.net/u/valtri/</uri></author><id>https://sourceforge.net9c44889e430deac3782e0ceef950b454554b858c</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;: open --&amp;gt; closed-fixed&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</summary></entry><entry><title>#21 Log4c printing date entries in  GMT not localtime.</title><link href="https://sourceforge.net/p/log4c/bugs/21/?limit=25#1a33" rel="alternate"/><published>2013-09-29T19:29:04.899000Z</published><updated>2013-09-29T19:29:04.899000Z</updated><author><name>František Dvořák</name><uri>https://sourceforge.net/u/valtri/</uri></author><id>https://sourceforge.net04386e443b7608137e5af1eb7238d7f4776c8b22</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;assigned_to&lt;/strong&gt;: František Dvořák&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Group&lt;/strong&gt;:  --&amp;gt; v1.2.4&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</summary></entry><entry><title>#16 Compiling Problems with XLC on AIX</title><link href="https://sourceforge.net/p/log4c/bugs/16/?limit=25#33e8" rel="alternate"/><published>2013-09-29T14:04:18.534000Z</published><updated>2013-09-29T14:04:18.534000Z</updated><author><name>František Dvořák</name><uri>https://sourceforge.net/u/valtri/</uri></author><id>https://sourceforge.net667d4e91943919bd77353612400138f7e8ee1eb4</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;: open --&amp;gt; pending&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Group&lt;/strong&gt;:  --&amp;gt; v1.0 (example)&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</summary></entry><entry><title>appender_type_mmap unexpected behaviour at end of file</title><link href="https://sourceforge.net/p/log4c/bugs/26/" rel="alternate"/><published>2011-02-22T13:51:14Z</published><updated>2011-02-22T13:51:14Z</updated><author><name>sei1</name><uri>https://sourceforge.net/u/sei1/</uri></author><id>https://sourceforge.net5c449ab179cc7cf0ac1299c0c71a644bdd017d61</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;The supplied mmap appender handles the end of the file and prints the rest of the rendered_message at the start of the mmaped file, but instead prints the start of the message again. The append function should alter the pointer passed to memcpy to print the end of the message:&lt;/p&gt;
&lt;p&gt;...&lt;br /&gt;
+    char *msg = a_event-&amp;gt;evt_rendered_msg;&lt;/p&gt;
&lt;p&gt;if (!minfo &amp;amp;&amp;amp; !minfo-&amp;gt;ptr)&lt;br /&gt;
return 0;&lt;/p&gt;
&lt;p&gt;size = strlen(a_event-&amp;gt;evt_rendered_msg);&lt;br /&gt;
available = ((char *)minfo-&amp;gt;addr + minfo-&amp;gt;length) - (char *)minfo-&amp;gt;ptr;&lt;/p&gt;
&lt;p&gt;if (size &amp;gt; available) {&lt;br /&gt;
-        memcpy(minfo-&amp;gt;ptr, a_event-&amp;gt;evt_rendered_msg, available);&lt;br /&gt;
+        memcpy(minfo-&amp;gt;ptr, msg, available);&lt;br /&gt;
minfo-&amp;gt;ptr = minfo-&amp;gt;addr;&lt;br /&gt;
size -= available;&lt;br /&gt;
+        msg = msg + available;&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;-    memcpy(minfo-&amp;gt;ptr, a_event-&amp;gt;evt_rendered_msg, size);&lt;br /&gt;
+    memcpy(minfo-&amp;gt;ptr, msg, size);&lt;br /&gt;
minfo-&amp;gt;ptr = (char *)minfo-&amp;gt;ptr + size;&lt;br /&gt;
return 0;&lt;br /&gt;
}&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>stream appender close does not clear udata - alignment trap</title><link href="https://sourceforge.net/p/log4c/bugs/25/" rel="alternate"/><published>2011-01-31T17:09:37Z</published><updated>2011-01-31T17:09:37Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.net7956b654fc69fe14d08c6202d2909ee581c9d9b6</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;In appender_type_stream.c, the stream_close function does not set the udata to NULL after closing the file.  This causes a problem when a user attempts to reopen an appender against that stream as the stream_open function loads the udata, sees that it is non-NULL and returns without opening the file again.&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;adding:&lt;br /&gt;
log4c_appender_set_udata(this, NULL);&lt;br /&gt;
before the return statement fixed the problem, but it is probably safer/cleaner to change the return statement to be&lt;br /&gt;
int retval = fclose(fp);&lt;br /&gt;
if (!retval) {&lt;br /&gt;
log4c_appender_set_udata(this, NULL);&lt;br /&gt;
}&lt;br /&gt;
return retval;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>rollingfile appender segfault</title><link href="https://sourceforge.net/p/log4c/bugs/24/" rel="alternate"/><published>2011-01-07T14:39:54Z</published><updated>2011-01-07T14:39:54Z</updated><author><name>Brian Keen</name><uri>https://sourceforge.net/u/bkeen/</uri></author><id>https://sourceforge.netb5fc3193b7df23140307e9e812b28d764c8d8bc5</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Using the rollingfile appender to log a string that contains a sequence of 'printf' formatting characters such as "%s" gives a segmentation fault.&lt;/p&gt;
&lt;p&gt;I think the fault lies in the file appender_type_rollingfile.c:-&lt;/p&gt;
&lt;p&gt;/* only attempt the write if the policy implem says I can */&lt;br /&gt;
if ( rc &amp;lt;= ROLLINGPOLICY_ROLLOVER_ERR_CAN_LOG ) {             &lt;br /&gt;
rc = fprintf(rfup-&amp;gt;rfu_current_fp, a_event-&amp;gt;evt_rendered_msg);&lt;br /&gt;
rfup-&amp;gt;rfu_current_file_size += strlen(a_event-&amp;gt;evt_rendered_msg);&lt;/p&gt;
&lt;p&gt;The call to fprint() is missing a format string. It should be:-&lt;br /&gt;
rc = fprintf(rfup-&amp;gt;rfu_current_fp, "%s", a_event-&amp;gt;evt_rendered_msg);&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>sd_vsprintf segfaults</title><link href="https://sourceforge.net/p/log4c/bugs/23/" rel="alternate"/><published>2010-06-29T12:48:32Z</published><updated>2010-06-29T12:48:32Z</updated><author><name>iabdelkader</name><uri>https://sourceforge.net/u/iabdelkader/</uri></author><id>https://sourceforge.net12683910e727c509df4db55a69674f9726b26764</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;If I log a buffer longer than 1024 bytes sd_vsprintf segfaults, looking at sprintf.c I see that vsnprintf is called multiple times if the buffer &amp;gt; 1024, vsnprintf doesn't call va_end so va_list is invalid after the first call, and needs to be copied first:&lt;/p&gt;
&lt;p&gt;va_copy(ap, a_args);&lt;br /&gt;
int n = vsnprintf(buffer, size, a_fmt, ap);&lt;br /&gt;
va_end(ap);&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Rolling logger could close stderr</title><link href="https://sourceforge.net/p/log4c/bugs/22/" rel="alternate"/><published>2009-08-27T20:11:52Z</published><updated>2009-08-27T20:11:52Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.net0784ac578b3a21451d0eb443338ea9dc6141501c</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;If the rolling logger has issues opening it's next file, it defaults to stderr:&lt;br /&gt;
312    *fpp = stderr;&lt;/p&gt;
&lt;p&gt;However, after it's done filling up (as it tracks the file size writes by itself, and not by using system calls), it will close it:&lt;br /&gt;
200     rc = (rfup-&amp;gt;rfu_current_fp ? fclose(rfup-&amp;gt;rfu_current_fp) : 0);&lt;/p&gt;
&lt;p&gt;Seems like one might not want that to happen.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Log4c printing date entries in  GMT not localtime.</title><link href="https://sourceforge.net/p/log4c/bugs/21/" rel="alternate"/><published>2009-03-10T17:30:51Z</published><updated>2009-03-10T17:30:51Z</updated><author><name>Matthew S. Soffen</name><uri>https://sourceforge.net/u/sirgeek/</uri></author><id>https://sourceforge.net88062e461f63b3248824b9997f65b6bd18bb7c04</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I'm currently using log4c in an application where its starts up as a daemon.  The logging happens properly however, the times logged are in GMT.&lt;/p&gt;
&lt;p&gt;I'm currently in EDT (-4 GMT) and as of Mar 10, 2009 at 13:29, it is logging as follows:&lt;/p&gt;
&lt;p&gt;20090310 17:29:30.775 DEBUG    protocol- storeLoopPkt: Returning...&lt;br /&gt;
20090310 17:29:30.775 DEBUG    protocol- stationGetReadings: Returning...&lt;br /&gt;
20090310 17:29:45.775 DEBUG    protocol- stationGetReadings: Starting...&lt;br /&gt;
20090310 17:29:45.776 DEBUG    protocol- storeLoopPkt: Returning...&lt;br /&gt;
20090310 17:29:45.776 DEBUG    protocol- storeLoopPkt: Returning...&lt;/p&gt;
&lt;p&gt;Is there anyway to ensure that this is logging in Localtime instead of GMT ?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>