diff -durN old/python_support.c new/python_support.c
--- old/python_support.c	2012-12-04 01:03:05.000000000 +0200
+++ new/python_support.c	2012-12-04 00:56:04.000000000 +0200
@@ -31,11 +31,12 @@
 {
     PyObject *pResult;
     const char *msg;
+    char *buf;
+    size_t buflen;
     PyObject *exception, *v, *tb, *args;
     PyObject *line;
     int i;
 
-    LM_ERR("%s: Unhandled exception in the Python code:\n", fname);
     PyErr_Fetch(&exception, &v, &tb);
     PyErr_Clear();
     if (exception == NULL) {
@@ -61,22 +62,37 @@
         LM_ERR("can't get traceback, traceback.format_exception() has failed\n");
         return;
     }
+
+    buflen = 1;
+    buf = (char *)calloc(buflen, sizeof(char *));
+
     for (i = 0; i < PySequence_Size(pResult); i++) {
         line = PySequence_GetItem(pResult, i);
         if (line == NULL) {
             LM_ERR("can't get traceback, PySequence_GetItem() has failed\n");
             Py_DECREF(pResult);
+	    free(buf);
             return;
         }
+
         msg = PyString_AsString(line);
+
         if (msg == NULL) {
             LM_ERR("can't get traceback, PyString_AsString() has failed\n");
             Py_DECREF(line);
             Py_DECREF(pResult);
+	    free(buf);
             return;
         }
-        LM_ERR("\t%s", msg);
+
+	buflen += strlen(msg);
+	buf = (char *)realloc(buf, (buflen + 1) * sizeof(char *));
+	strcat(buf, msg);
         Py_DECREF(line);
     }
+
+    LM_ERR("%s: Unhandled exception in the Python code:\n%s", fname, buf);
+    free(buf);
+
     Py_DECREF(pResult);
 }
diff -durN old/TestCase_Traceback.py new/TestCase_Traceback.py
--- old/TestCase_Traceback.py	1970-01-01 03:00:00.000000000 +0300
+++ new/TestCase_Traceback.py	2012-12-04 01:11:19.000000000 +0200
@@ -0,0 +1,46 @@
+# -*- coding: utf-8 -*-
+
+"""
+    Script for traceback test.
+    2012.12.03: Created by: Konstantin M. <evilzluk@gmail.com>
+"""
+
+import pprint
+
+class Loggers:
+
+    def __init__(self):
+	pass
+
+    def __del__(self):
+	pass
+
+    def child_init(self, y):
+	return 0
+
+    def BuggyCode_lvl5(self, a):
+	a / 0
+
+    def BuggyCode_lvl4(self, a):
+	return self.BuggyCode_lvl5(a)
+
+    def BuggyCode_lvl3(self, a):
+	return self.BuggyCode_lvl4(a)
+
+    def BuggyCode_lvl2(self, a):
+	return self.BuggyCode_lvl3(a)
+
+    def BuggyCode(self, a, b=None):
+	return self.BuggyCode_lvl2(a)
+
+
+
+def mod_init():
+    return Loggers()
+
+
+
+if __name__ != "__main__":
+    import Kamailio
+else:
+    mod_init().BuggyCode(0)
