<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to patches</title><link href="https://sourceforge.net/p/log4c/patches/" rel="alternate"/><link href="https://sourceforge.net/p/log4c/patches/feed.atom" rel="self"/><id>https://sourceforge.net/p/log4c/patches/</id><updated>2013-09-29T21:17:56.439000Z</updated><subtitle>Recent changes to patches</subtitle><entry><title>#9 Heap reallocation for custom formatters</title><link href="https://sourceforge.net/p/log4c/patches/9/?limit=25#7a81" rel="alternate"/><published>2013-09-29T21:17:56.439000Z</published><updated>2013-09-29T21:17:56.439000Z</updated><author><name>František Dvořák</name><uri>https://sourceforge.net/u/valtri/</uri></author><id>https://sourceforge.netac1841bc5af1a294654092ea9b00f670fc6b9b34</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; wont-fix&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Group&lt;/strong&gt;:  --&amp;gt; Unstable (example)&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</summary></entry><entry><title>Fixes memory leaks in log4c_fini()</title><link href="https://sourceforge.net/p/log4c/patches/10/" rel="alternate"/><published>2013-02-22T12:42:38Z</published><updated>2013-02-22T12:42:38Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.net483db0db8284c4bda865d86694b7c0100147613a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;log4c_fini() does not free some resources. The attached patch remedies this.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Heap reallocation for custom formatters</title><link href="https://sourceforge.net/p/log4c/patches/9/" rel="alternate"/><published>2011-12-09T18:33:30Z</published><updated>2011-12-09T18:33:30Z</updated><author><name>dpv</name><uri>https://sourceforge.net/u/dpvnuance/</uri></author><id>https://sourceforge.net57d50e4e11ecbc06f6a7c05f5109ca04d4923aa7</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;This provided patch allows a custom formatter to reallocate the event buffer on the heap. Our custom formatter would normally take the stack allocated buffer but sometimes has to reallocate a larger buffer on the heap. Applying the provided patch and by making sure that the custom formatter sets the evt.evt_buffer.buf_maxsize variable to 0, it is now possible to reallocate on the heap without leaking.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Heap reallocation for custom formatters</title><link href="https://sourceforge.net/p/log4c/patches/9/" rel="alternate"/><published>2011-12-09T18:33:30Z</published><updated>2011-12-09T18:33:30Z</updated><author><name>dpv</name><uri>https://sourceforge.net/u/dpvnuance/</uri></author><id>https://sourceforge.netc2a7bb770b0b9cf21f419011a7c0d5474e2dc30d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Ticket 9 has been modified: Heap reallocation for custom formatters&lt;br /&gt;
Edited By: František Dvořák (valtri)&lt;br /&gt;
Status updated: u'open' =&amp;gt; u'wont-fix'&lt;br /&gt;
_milestone updated: '' =&amp;gt; u'Unstable (example)'&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Fixes a possible crash in appender_type_rollingfile.c</title><link href="https://sourceforge.net/p/log4c/patches/8/" rel="alternate"/><published>2011-12-09T18:23:33Z</published><updated>2011-12-09T18:23:33Z</updated><author><name>dpv</name><uri>https://sourceforge.net/u/dpvnuance/</uri></author><id>https://sourceforge.nete3352e6bb9f8614cf64257d2c31acf3955543948</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Version 1.2.1 uses a call to fprintf to save the log event to the file. The content of the log buffer is then passed to the format string which enforces the caller to sanitize the string in order to avoid a possible crash. The provided patch fixes the issue.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>log4c socket interface like log4j update</title><link href="https://sourceforge.net/p/log4c/patches/7/" rel="alternate"/><published>2009-10-18T13:14:34Z</published><updated>2009-10-18T13:14:34Z</updated><author><name>Herman ten Brugge</name><uri>https://sourceforge.net/u/hermantenbrugge/</uri></author><id>https://sourceforge.net33d58597e0bc1ea03b7a090e3e38c20c41fdb864</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I seems I forgot to include the new code in the previous version of this patch.&lt;br /&gt;
It is now included.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>log4c socket interface like log4j</title><link href="https://sourceforge.net/p/log4c/patches/6/" rel="alternate"/><published>2009-09-11T16:09:27Z</published><updated>2009-09-11T16:09:27Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.netf1369562a027d5f0c5552494dfc0ac66bf5452f9</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;This adds a socket interface appender so you can use chainsaw to see the events. This is very useful is you have mixed java/c code.&lt;br /&gt;
I only tested this on linux and not on windows so this probably wont work.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Log4c_light: Fixed incorrect array length check</title><link href="https://sourceforge.net/p/log4c/patches/5/" rel="alternate"/><published>2009-08-25T09:33:31Z</published><updated>2009-08-25T09:33:31Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.net7fd5a15891365ed35761de313191f937d2c20744</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Fixed incorrect array length checking in DefaultLogAppender.&lt;br /&gt;
Also was fixed naming of high priorities in the same appender.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>rollingfile appender patch</title><link href="https://sourceforge.net/p/log4c/patches/4/" rel="alternate"/><published>2006-11-02T14:34:59Z</published><updated>2006-11-02T14:34:59Z</updated><author><name>Robert Byrne</name><uri>https://sourceforge.net/u/rbyrne/</uri></author><id>https://sourceforge.nete62d585b1563989848c0c7c5700790bb4f2788a2</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;The attached diffs implement a rollingfile appender&lt;br /&gt;
type in log4c that should satisfy the properties I&lt;br /&gt;
mention below.  I have used the test pograms below to&lt;br /&gt;
verify basic functionality on Linux and Windows.&lt;/p&gt;
&lt;p&gt;The best way to understand the concepts it is to read&lt;br /&gt;
the documentation in the appender_type_rollingfile.h,&lt;br /&gt;
rollingpolicy.h and rollingpolicy_type_sizewin.h files.&lt;/p&gt;
&lt;p&gt;The best way to see how to use the API is to read that&lt;br /&gt;
documentation and then look at the&lt;br /&gt;
test_rollingfile_appender.c and&lt;br /&gt;
test_rollingfile_appender_mt.c files.  Also look at the&lt;br /&gt;
log4crc config file in the&lt;br /&gt;
examples directory that shows how to configure a&lt;br /&gt;
rollingfile appender for use with application_2.&lt;/p&gt;
&lt;p&gt;In terms of an idea of changes to the existing code&lt;br /&gt;
base (as opposed to the additions of new files) these&lt;br /&gt;
diffs bring:&lt;/p&gt;
&lt;p&gt;1. alot of tracing using the sd_debug() function (only&lt;br /&gt;
there if __SD_DEBUG__ defined at compile time AND&lt;br /&gt;
SD_DEBUG env variable set at run time).  These traces&lt;br /&gt;
are very useful in particular for watching the&lt;br /&gt;
lifecycle of the various log4c objects.&lt;/p&gt;
&lt;p&gt;2. register the new rollingfile appender type, the new&lt;br /&gt;
rollingpolicy base type and sizewin rollingpolicy type.&lt;/p&gt;
&lt;p&gt;3. fixed some problems with the dated layout on windows&lt;br /&gt;
(usage of the time API was a bit odd or even incorrect).&lt;/p&gt;
&lt;p&gt;4. the examples now call log4c_fini()  explicitly, as&lt;br /&gt;
is now required.&lt;/p&gt;
&lt;p&gt;5. Should take a file lock to protect the logging file&lt;br /&gt;
so that other process can see the file is in use&lt;br /&gt;
(currently rely solely on mutexes to protect the file&lt;br /&gt;
between threads).&lt;/p&gt;
&lt;p&gt;Some todo items:&lt;/p&gt;
&lt;p&gt;1. variables tracking filesize should be 'long long'&lt;br /&gt;
rather than long.&lt;/p&gt;
&lt;p&gt;2. the rollingfile appender pre-pends "[&amp;lt;appender&lt;br /&gt;
name&amp;gt;]"  systematically.  Not sure how usefult  that&lt;br /&gt;
is--maybe it should be configurable to not include it.&lt;/p&gt;
&lt;p&gt;3. If we fail to create the log files then all messages&lt;br /&gt;
for that appender go to stderr--might be annoying so&lt;br /&gt;
make that behaviour configurable.&lt;/p&gt;
&lt;p&gt;4. Multi-Thread issues.  The rollingfile appender is MT&lt;br /&gt;
safe....as long as the appender is created and opened&lt;br /&gt;
by one thread.  Thereafter the calls to append() are&lt;br /&gt;
thread safe (using the mutex created at init time).  We&lt;br /&gt;
should revisit the log4c model to see how init, get,&lt;br /&gt;
open, close and fini can be rendered more MT safe in&lt;br /&gt;
general.  As usual there is potentially some overhead&lt;br /&gt;
in adding the required synchronization calls...&lt;/p&gt;
&lt;p&gt;----&lt;/p&gt;
&lt;p&gt;the rollingfile implem should have the following&lt;br /&gt;
properties:&lt;/p&gt;
&lt;p&gt;1. implements a rolling (or rotating if you like)  file&lt;br /&gt;
logging mechanism analagous to Java's.&lt;br /&gt;
2. logdir, filename prefix, max file size, man num&lt;br /&gt;
files are configurable&lt;br /&gt;
3. Allows alternative rollover policies to be written&lt;br /&gt;
eg. based on time rather than size, by providing new&lt;br /&gt;
rollingpolicy types.&lt;br /&gt;
3. can be configured programmatically or via the xml file&lt;br /&gt;
4. MT safe&lt;br /&gt;
5. runs on windows (and unixes of course)&lt;/p&gt;
&lt;p&gt;Creates a dependency on pthread....but we can manage&lt;br /&gt;
that with HAVE_PTHREAD_H etc in configure.in.  On&lt;br /&gt;
Windows we will use the native windows thread synchro&lt;br /&gt;
primitives.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Change methode log_init in init.c</title><link href="https://sourceforge.net/p/log4c/patches/3/" rel="alternate"/><published>2006-10-16T13:17:46Z</published><updated>2006-10-16T13:17:46Z</updated><author><name>louis</name><uri>https://sourceforge.net/u/louist/</uri></author><id>https://sourceforge.netb9453d9710a95b3df0646d4b2feb9ea7df65b0eb</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;A simple change for &lt;br /&gt;
- stop loading logcrc file when a file was found.&lt;br /&gt;
- change the loading order (begin with the program&lt;br /&gt;
path, the home path and finish with the LOG4C_PATH...)&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>