hpx/logging/format/destinations.hpp

See Public API for a list of names and headers that are part of the public HPX API.

namespace hpx
namespace util
namespace logging
namespace destination

Destination is a manipulator. It contains a place where the message, after being formatted, is to be written to.

Some viable destinations are : the console, a file, a socket, etc.

struct cerr : public hpx::util::logging::destination::manipulator
#include <destinations.hpp>

Writes the string to cerr.

Public Functions

~cerr()

Public Static Functions

static std::unique_ptr<cerr> make()

Protected Functions

cerr()
struct cout : public hpx::util::logging::destination::manipulator
#include <destinations.hpp>

Writes the string to console.

Public Functions

~cout()

Public Static Functions

static std::unique_ptr<cout> make()

Protected Functions

cout()
struct dbg_window : public hpx::util::logging::destination::manipulator
#include <destinations.hpp>

Writes the string to output debug window.

For non-Windows systems, this is the console.

Public Functions

~dbg_window()

Public Static Functions

static std::unique_ptr<dbg_window> make()

Protected Functions

dbg_window()
struct file : public hpx::util::logging::destination::manipulator
#include <destinations.hpp>

Writes the string to a file.

Public Functions

~file()

Public Static Functions

static std::unique_ptr<file> make(std::string const &file_name, file_settings set = {})

constructs the file destination

Parameters
  • file_name: name of the file

  • set: [optional] file settings - see file_settings class, and dealing_with_flags

Protected Functions

file(std::string const &file_name, file_settings set)

Protected Attributes

std::string name
file_settings settings
struct file_settings
#include <destinations.hpp>

settings for when constructing a file class. To see how it’s used, see dealing_with_flags.

Public Functions

file_settings()

Public Members

bool flush_each_time : 1

if true (default), flushes after each write

bool initial_overwrite : 1
bool do_append : 1
std::ios_base::openmode extra_flags

just in case you have some extra flags to pass, when opening the file

struct stream : public hpx::util::logging::destination::manipulator
#include <destinations.hpp>

writes to stream.

Note

: The stream must outlive this object! Or, clear() the stream, before the stream is deleted.

Public Functions

~stream()
void set_stream(std::ostream *stream_ptr)

resets the stream. Further output will be written to this stream

void clear()

clears the stream. Further output will be ignored

Public Static Functions

static std::unique_ptr<stream> make(std::ostream *stream_ptr)

Protected Functions

stream(std::ostream *stream_ptr)

Protected Attributes

std::ostream *ptr