+2003-07-26 Matthias Clasen <maclas@gmx.de>
+
+ * glib/gmessages.c (g_logv): Remove the 1024 char limit in the common (non-recursive)
+ case.
+
2003-07-25 Matthias Clasen <maclas@gmx.de>
* glib/gwin32.c:
+2003-07-26 Matthias Clasen <maclas@gmx.de>
+
+ * glib/gmessages.c (g_logv): Remove the 1024 char limit in the common (non-recursive)
+ case.
+
2003-07-25 Matthias Clasen <maclas@gmx.de>
* glib/gwin32.c:
+2003-07-26 Matthias Clasen <maclas@gmx.de>
+
+ * glib/gmessages.c (g_logv): Remove the 1024 char limit in the common (non-recursive)
+ case.
+
2003-07-25 Matthias Clasen <maclas@gmx.de>
* glib/gwin32.c:
+2003-07-26 Matthias Clasen <maclas@gmx.de>
+
+ * glib/gmessages.c (g_logv): Remove the 1024 char limit in the common (non-recursive)
+ case.
+
2003-07-25 Matthias Clasen <maclas@gmx.de>
* glib/gwin32.c:
+2003-07-26 Matthias Clasen <maclas@gmx.de>
+
+ * glib/gmessages.c (g_logv): Remove the 1024 char limit in the common (non-recursive)
+ case.
+
2003-07-25 Matthias Clasen <maclas@gmx.de>
* glib/gwin32.c:
+2003-07-26 Matthias Clasen <maclas@gmx.de>
+
+ * glib/gmessages.c (g_logv): Remove the 1024 char limit in the common (non-recursive)
+ case.
+
2003-07-25 Matthias Clasen <maclas@gmx.de>
* glib/gwin32.c:
+2003-07-26 Matthias Clasen <maclas@gmx.de>
+
+ * glib/tmpl/messages.sgml: Remove the note about the message length restriction.
+
2003-07-24 Matthias Clasen <maclas@gmx.de>
* glib/tmpl/messages.sgml: Mention the restriction on message length. (#118043, Martyn Russell)
These functions provide support for logging error messages or messages used for debugging.
</para>
-<para>
-Note that the formatted messages must not exceed 1024 bytes. Longer messages will be truncated.
-</para>
-
<para>
There are several built-in levels of messages, defined in #GLogLevelFlags.
These can be extended with user-defined levels.
const gchar *format,
va_list args1)
{
- gchar buffer[1025];
gboolean was_fatal = (log_level & G_LOG_FLAG_FATAL) != 0;
gboolean was_recursion = (log_level & G_LOG_FLAG_RECURSION) != 0;
gint i;
if (!log_level)
return;
- /* we use a stack buffer of fixed size, because we might get called
- * recursively.
- */
- _g_vsnprintf (buffer, 1024, format, args1);
-
for (i = g_bit_nth_msf (log_level, -1); i >= 0; i = g_bit_nth_msf (log_level, i))
{
register GLogLevelFlags test_level;
}
}
- log_func (log_domain, test_level, buffer, data);
+ if (test_level & G_LOG_FLAG_RECURSION)
+ {
+ /* we use a stack buffer of fixed size, since we're likely
+ * in an out-of-memory situation
+ */
+ gchar buffer[1025];
+ gint size;
+ size = _g_vsnprintf (buffer, 1024, format, args1);
+
+ log_func (log_domain, test_level, buffer, data);
+ }
+ else
+ {
+ gchar *msg = g_strdup_vprintf (format, args1);
+
+ log_func (log_domain, test_level, msg, data);
+
+ g_free (msg);
+ }
if (test_level & G_LOG_FLAG_FATAL)
{