LibreOffice
LibreOffice 24.2 SDK C/C++ API Reference
|
#include "sal/config.h"
#include <cstdlib>
#include <sstream>
#include <string>
#include "sal/detail/log.h"
#include "sal/saldllapi.h"
#include "sal/types.h"
Go to the source code of this file.
Macros | |
#define | SAL_WHERE SAL_DETAIL_WHERE |
A simple macro to create a "file and line number" string. More... | |
#define | SAL_STREAM(stream) (dynamic_cast< ::std::ostringstream & >(::std::ostringstream() << stream).str()) |
A facility for generating temporary string messages by piping items into a C++ std::ostringstream. More... | |
#define | SAL_INFO(area, stream) |
Produce log entry from stream in the given log area. More... | |
#define | SAL_INFO_IF(condition, area, stream) |
Produce log entry from stream in the given log area if condition is true. More... | |
#define | SAL_WARN(area, stream) |
Produce warning entry from stream in the given log area. More... | |
#define | SAL_WARN_IF(condition, area, stream) |
Produce warning entry from stream in the given log area if condition is true. More... | |
#define | SAL_DEBUG(stream) |
Produce temporary debugging output from stream. More... | |
#define | SAL_DEBUG_IF(condition, stream) |
Produce temporary debugging output from stream, if condition is true. More... | |
#define | SAL_DEBUG_BACKTRACE(stream, backtraceDepth) |
Produce temporary debugging output from stream along with a backtrace of the calling location. More... | |
#define SAL_DEBUG | ( | stream | ) |
Produce temporary debugging output from stream.
This macro is meant to be used only while working on code and should never exist in production code.
See basic logging functionality for details.
#define SAL_DEBUG_BACKTRACE | ( | stream, | |
backtraceDepth | |||
) |
Produce temporary debugging output from stream along with a backtrace of the calling location.
This macro is meant to be used only while working on code and should never exist in production code.
stream | input stream |
backtraceDepth | a sal_uInt32 value indicating the maximum backtrace depth; zero means no backtrace |
See basic logging functionality for details.
#define SAL_DEBUG_IF | ( | condition, | |
stream | |||
) |
Produce temporary debugging output from stream, if condition is true.
This macro is meant to be used only while working on code and should never exist in production code.
See basic logging functionality for details.
#define SAL_INFO | ( | area, | |
stream | |||
) |
Produce log entry from stream in the given log area.
See basic logging functionality for details.
#define SAL_INFO_IF | ( | condition, | |
area, | |||
stream | |||
) |
Produce log entry from stream in the given log area if condition is true.
See basic logging functionality for details.
#define SAL_STREAM | ( | stream | ) | (dynamic_cast< ::std::ostringstream & >(::std::ostringstream() << stream).str()) |
A facility for generating temporary string messages by piping items into a C++ std::ostringstream.
This can be useful for example in a call to SAL_INFO when depending on some boolean condition data of incompatible types shall be streamed into the message, as in:
SAL_INFO("foo", "object: " << (hasName ? obj->name : SAL_STREAM(obj)));
#define SAL_WARN | ( | area, | |
stream | |||
) |
Produce warning entry from stream in the given log area.
See basic logging functionality for details.
#define SAL_WARN_IF | ( | condition, | |
area, | |||
stream | |||
) |
Produce warning entry from stream in the given log area if condition is true.
See basic logging functionality for details.
#define SAL_WHERE SAL_DETAIL_WHERE |
A simple macro to create a "file and line number" string.
Potentially not only useful within the log framework (where it is used automatically), but also when creating exception messages.