summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-10-26 23:08:04 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-10-26 23:08:04 +0200
commit90439a2f211b723a0cf6d699ca8cb4da7384580a (patch)
tree067ca450d693c18ce9725b5621c5aa9da54d9d5e /sal
parentc484c353ef8ad3d40dce7f1ef1ea1b3620c504d0 (diff)
sal::detail::logFormat is no longer needed
...since 97354578d7195bce927f0c00c4e2ae9cd7344776 "Remove the obsolete functionality originally underlying osl/diagnose.h" Change-Id: I7c920bca9cdddb37fcbbc15d8629d01c21eb0787
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/all/log.cxx27
-rw-r--r--sal/osl/all/logformat.hxx29
2 files changed, 9 insertions, 47 deletions
diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx
index afde14288962..00bd67cbb759 100644
--- a/sal/osl/all/log.cxx
+++ b/sal/osl/all/log.cxx
@@ -27,8 +27,6 @@
#include "sal/types.h"
#include "misc.hxx"
-#include "logformat.hxx"
-
#if defined ANDROID
#include <android/log.h>
#elif defined WNT
@@ -365,24 +363,17 @@ void sal_detail_logFormat(
if (report(level, area)) {
std::va_list args;
va_start(args, format);
- osl::detail::logFormat(level, area, where, format, args);
+ char buf[1024];
+ int const len = sizeof buf - RTL_CONSTASCII_LENGTH("...");
+ int n = vsnprintf(buf, len, format, args);
+ if (n < 0) {
+ std::strcpy(buf, "???");
+ } else if (n >= len) {
+ std::strcpy(buf + len - 1, "...");
+ }
+ log(level, area, where, buf);
va_end(args);
}
}
-void osl::detail::logFormat(
- sal_detail_LogLevel level, char const * area, char const * where,
- char const * format, std::va_list arguments)
-{
- char buf[1024];
- int const len = sizeof buf - RTL_CONSTASCII_LENGTH("...");
- int n = vsnprintf(buf, len, format, arguments);
- if (n < 0) {
- std::strcpy(buf, "???");
- } else if (n >= len) {
- std::strcpy(buf + len - 1, "...");
- }
- log(level, area, where, buf);
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/osl/all/logformat.hxx b/sal/osl/all/logformat.hxx
deleted file mode 100644
index 0e579a9bfc54..000000000000
--- a/sal/osl/all/logformat.hxx
+++ /dev/null
@@ -1,29 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-#ifndef INCLUDED_SAL_OSL_ALL_LOGFORMAT_HXX
-#define INCLUDED_SAL_OSL_ALL_LOGFORMAT_HXX
-
-#include "sal/config.h"
-
-#include <cstdarg>
-
-#include "sal/detail/log.h"
-
-namespace osl { namespace detail {
-
-void logFormat(
- sal_detail_LogLevel level, char const * area, char const * where,
- char const * format, std::va_list arguments);
-
-} }
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */