Msg Namespace Reference

Contains logging-related functions. More...

## Enumerations

enum | Severity { SevMessage , SevWarning }
| Used by the Msg::print() call. More...

## Functions

void | print (const std::string &message)
| Sends the string to the assigned output.
FIELD3D_API void | print (Severity severity, const std::string &message)
| Sends the string to the assigned output, prefixing the message with the severity.
FIELD3D_API void | setVerbosity (int level=1)
| Set the verbosity level of console output: 0 = do not echo anything to the console; >=1 = echo all messages and warnings to the console.

## Variables

static int | g_verbosity = 1

## Detailed Description

Contains logging-related functions.

## Enumeration Type Documentation

## Severity

enum Msg::Severity

Used by the Msg::print() call.

Enumerator
SevMessage |
SevWarning |

Definition at line 66 of file Log.h.

{
SevMessage,
SevWarning
};
Msg::SevMessage
@ SevMessage
Definition Log.h:67
Msg::SevWarning
@ SevWarning
Definition Log.h:68

## Function Documentation

## print() [1/2]

void Msg::print | ( | Severity | severity,
|  | const std::string & | message )

Sends the string to the assigned output, prefixing the message with the severity.

Definition at line 70 of file Log.cpp.

{
if (g_verbosity < 1)
return;
switch(severity) {
case SevWarning:
cout << "WARNING: ";
break;
case SevMessage:
default:
break;
// Do nothing
}
cout << message << endl;
}
Msg::g_verbosity
static int g_verbosity
Definition Log.cpp:66

References g_verbosity, SevMessage, and SevWarning.

Referenced by SparseFile::Reference< Data_T >::closeFile(), Field3DFileHDF5Base::closeInternal(), Field3DOutputFileHDF5::create(), Field3DOutputFile::createNewPartition(), Field3DOutputFileHDF5::createNewPartition(), SparseField< Data_T >::fastLValue(), FileSequence::FileSequence(), findRegistrationFunc(), Field3DFileBase::getIntScalarLayerNames(), Field3DFileHDF5Base::getIntScalarLayerNames(), Field3DFileBase::getIntVectorLayerNames(), Field3DFileHDF5Base::getIntVectorLayerNames(), PluginLoader::loadPlugins(), Field3DInputFile::open(), Field3DInputFileHDF5::open(), SparseFile::Reference< Data_T >::openFile(), SparseField< Data_T >::iterator::operator*(), SparseField< Data_T >::iterator::operator->(), Field3DInputFileHDF5::parseLayer(), print(), FrustumFieldMappingIO::read(), FrustumFieldMappingIO::read(), MatrixFieldMappingIO::read(), MatrixFieldMappingIO::read(), NullFieldMappingIO::read(), NullFieldMappingIO::read(), readField(), readFieldMapping(), Field3DInputFileHDF5::readGroupMembership(), Field3DInputFile::readLayer(), Field3DInputFileHDF5::readLayer(), Field3DInputFileHDF5::readMetadata(), Field3DInputFileHDF5::readMetadata(), Field3DInputFile::readPartitionAndLayerInfo(), Field3DInputFileHDF5::readPartitionAndLayerInfo(), Field3DInputFile::readProxyLayer(), Field3DInputFileHDF5::readProxyLayer(), ClassFactory::registerField(), ClassFactory::registerFieldIO(), ClassFactory::registerFieldMapping(), ClassFactory::registerFieldMappingIO(), FieldRes::setMapping(), Vec<>::setOsToWs(), FrustumFieldMappingIO::write(), FrustumFieldMappingIO::write(), MatrixFieldMappingIO::write(), MatrixFieldMappingIO::write(), NullFieldMappingIO::write(), Hdf5Util::writeAttribute(), Hdf5Util::writeAttribute(), Hdf5Util::writeAttribute(), Hdf5Util::writeAttribute(), Hdf5Util::writeAttribute(), Hdf5Util::writeAttribute(), Hdf5Util::writeAttribute(), writeField(), writeFieldMapping(), Field3DOutputFile::writeGlobalMetadata(), Field3DOutputFileHDF5::writeGlobalMetadata(), Field3DOutputFile::writeGroupMembership(), Field3DOutputFileHDF5::writeGroupMembership(), Field3DOutputFile::writeLayer(), Field3DOutputFileHDF5::writeLayer(), Field3DOutputFile::writeMapping(), Field3DOutputFileHDF5::writeMapping(), Field3DOutputFile::writeMetadata(), Field3DOutputFile::writeMetadata(), Field3DOutputFileHDF5::writeMetadata(), Field3DOutputFileHDF5::writeMetadata(), Field3DOutputFileHDF5::writeScalarLayer(), and Field3DOutputFileHDF5::writeVectorLayer().

## print() [2/2]

void Msg::print | ( | const std::string & | message | ) |

inline

Sends the string to the assigned output.

Definition at line 76 of file Log.h.

{ print(SevMessage, message); }
Msg::print
FIELD3D_API void print(Severity severity, const std::string &message)
Sends the string to the assigned output, prefixing the message with the severity.
Definition Log.cpp:70

References print(), and SevMessage.

## setVerbosity()

void Msg::setVerbosity | ( | int | level = 1 | ) |

Set the verbosity level of console output: 0 = do not echo anything to the console; >=1 = echo all messages and warnings to the console.

Definition at line 90 of file Log.cpp.

{
g_verbosity = level;
}

References g_verbosity.

## Variable Documentation

## g_verbosity

int Msg::g_verbosity = 1

static

Definition at line 66 of file Log.cpp.

Referenced by print(), and setVerbosity().