aboutsummaryrefslogtreecommitdiff
path: root/src/util/common_logging.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-08-11 06:20:40 +0200
committerChristian Grothoff <christian@grothoff.org>2018-08-11 06:20:40 +0200
commitba30221f3588d75b3073cd737fbbf6d0c80e5906 (patch)
treeaf268deae97db1d58c5f84381d15e49740484753 /src/util/common_logging.c
parent0f54ff0768d776d07231418e6370602c3789ee56 (diff)
downloadgnunet-ba30221f3588d75b3073cd737fbbf6d0c80e5906.tar.gz
gnunet-ba30221f3588d75b3073cd737fbbf6d0c80e5906.zip
introduce allocation wrappers to improve libgcrypt performance
Diffstat (limited to 'src/util/common_logging.c')
-rw-r--r--src/util/common_logging.c51
1 files changed, 29 insertions, 22 deletions
diff --git a/src/util/common_logging.c b/src/util/common_logging.c
index f875d165d..be2e084b5 100644
--- a/src/util/common_logging.c
+++ b/src/util/common_logging.c
@@ -11,7 +11,7 @@
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU Affero General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/ 17*/
@@ -817,32 +817,39 @@ output_message (enum GNUNET_ErrorType kind,
817 if ( (NULL != GNUNET_stderr) && 817 if ( (NULL != GNUNET_stderr) &&
818 (NULL == loggers) ) 818 (NULL == loggers) )
819 { 819 {
820 if (kind == GNUNET_ERROR_TYPE_MESSAGE) { 820 if (kind == GNUNET_ERROR_TYPE_MESSAGE)
821 /* The idea here is to produce "normal" output messages 821 {
822 * for end users while still having the power of the 822 /* The idea here is to produce "normal" output messages
823 * logging engine for developer needs. So ideally this 823 * for end users while still having the power of the
824 * is what it should look like when CLI tools are used 824 * logging engine for developer needs. So ideally this
825 * interactively, yet the same message shouldn't look 825 * is what it should look like when CLI tools are used
826 * this way if the output is going to logfiles or robots 826 * interactively, yet the same message shouldn't look
827 * instead. Is this the right place to do this? --lynX 827 * this way if the output is going to logfiles or robots
828 */ 828 * instead.
829 FPRINTF (GNUNET_stderr, 829 */
830 "* %s", 830 FPRINTF (GNUNET_stderr,
831 msg); 831 "* %s",
832 } else { 832 msg);
833 FPRINTF (GNUNET_stderr, 833 }
834 "%s %s %s %s", 834 else
835 datestr, 835 {
836 comp, 836 FPRINTF (GNUNET_stderr,
837 GNUNET_error_type_to_string (kind), 837 "%s %s %s %s",
838 msg); 838 datestr,
839 comp,
840 GNUNET_error_type_to_string (kind),
841 msg);
839 } 842 }
840 fflush (GNUNET_stderr); 843 fflush (GNUNET_stderr);
841 } 844 }
842 pos = loggers; 845 pos = loggers;
843 while (pos != NULL) 846 while (NULL != pos)
844 { 847 {
845 pos->logger (pos->logger_cls, kind, comp, datestr, msg); 848 pos->logger (pos->logger_cls,
849 kind,
850 comp,
851 datestr,
852 msg);
846 pos = pos->next; 853 pos = pos->next;
847 } 854 }
848#if WINDOWS 855#if WINDOWS