7#ifndef IOSS_IOVS_CATALYST_LOGGING_H
8#define IOSS_IOVS_CATALYST_LOGGING_H
10#include "iocatalyst_export.h"
82 std::vector<std::string> getLogFileHeaders();
83 std::vector<std::string> writeToLogFile();
84 std::vector<std::vector<std::string>> readLogFile();
85 static std::vector<std::vector<std::string>> readLogFile(
const std::string &logFilePath);
88 if (logOutputDirectoryPath.empty()) {
89 return getLogFileName();
92 std::string opath = getLogOutputDirectoryPath();
93 if (opath.back() !=
'/') {
96 return opath + getLogFileName();
103 return propName.substr(logPrefix.length());
107 return logPrefix + headerName;
111 return propName == enabledProp || propName == fileNameProp || propName == directoryPathProp;
116 if (properties && properties->exists(propName)) {
129 std::string logPrefix =
"CATALYST_LOGGING_";
130 std::string enabledProp = logPrefix +
"ENABLED";
131 std::string fileNameProp = logPrefix +
"FILE_NAME";
132 std::string directoryPathProp = logPrefix +
"OUTPUT_DIRECTORY_PATH";
133 void initializeDefaults();
134 void writeVectorWithDelimeter(std::fstream &file,
const std::vector<std::string> &string_vector,
136 static std::vector<std::string> splitStringWithDelimeter(
const std::string &input,
138 bool isLogFileEmpty();
139 std::vector<std::string> getLogOutputFromProps(std::vector<std::string> &headers);
Definition Iocatalyst_CatalystLogging.h:20
std::string getHeaderNameFromPropName(std::string &propName)
Definition Iocatalyst_CatalystLogging.h:101
const Ioss::PropertyManager * properties
Definition Iocatalyst_CatalystLogging.h:128
std::string getDefaultLogOutputDirectoryPath()
Definition Iocatalyst_CatalystLogging.h:80
bool isSupportedPropType(std::string &propName)
Definition Iocatalyst_CatalystLogging.h:113
std::string logFileName
Definition Iocatalyst_CatalystLogging.h:126
std::string getPropNameFromHeaderName(std::string &headerName)
Definition Iocatalyst_CatalystLogging.h:105
std::string getLogOutputDirectoryPath()
Definition Iocatalyst_CatalystLogging.h:79
bool isCatalystLoggingON()
Definition Iocatalyst_CatalystLogging.h:76
bool isCatalystLoggingProp(std::string &propName)
Definition Iocatalyst_CatalystLogging.h:100
std::string logOutputDirectoryPath
Definition Iocatalyst_CatalystLogging.h:127
bool isReservedPropName(std::string &propName)
Definition Iocatalyst_CatalystLogging.h:109
std::string getLogFileName()
Definition Iocatalyst_CatalystLogging.h:77
std::string getLogFilePath()
Definition Iocatalyst_CatalystLogging.h:86
static std::string getDefaultLogFileName()
Definition Iocatalyst_CatalystLogging.h:78
bool catalystLoggingEnabled
Definition Iocatalyst_CatalystLogging.h:125
static char getDelimeter()
Definition Iocatalyst_CatalystLogging.h:99
A collection of Ioss::Property objects.
Definition Ioss_PropertyManager.h:36
BasicType
Definition Ioss_Property.h:29
@ INTEGER
Definition Ioss_Property.h:29
@ REAL
Definition Ioss_Property.h:29
@ STRING
Definition Ioss_Property.h:29
A namespace for the Catalyst 2.0 database format.
Definition Iocatalyst_CatalystLogging.C:13