File IDiagLog.hpp¶
↰ Parent directory (DiagLog)
Contents
Definition (DiagLog/IDiagLog.hpp)¶
Includes¶
DiagLog/IDiagLog.h(File IDiagLog.hpp)DlSystem/String.hpp(File String.hpp)Options.hpp(File Options.hpp)cstdintstring
Included By¶
Namespaces¶
Full File Listing¶
-
namespace DiagLog¶
-
class IDiagLog¶
- #include <IDiagLog.hpp>
Public Functions
-
bool setOptions(const Options &loggingOptions)¶
Sets the options after initialization occurs.
- Parameters
loggingOptions – [in] : The options to set up diagnostic logging.
- Returns
Error code if the options could not be set. Ensure logging is not started/ SNPE_SUCCESS otherwise
-
Options getOptions() const¶
Gets the curent options for the diag logger.
- Returns
Handle to access DiagLog options.
-
bool setDiagLogMask(const std::string &mask)¶
Allows for setting the log mask once diag logging has started.
- Parameters
mask – [in] : DiagLogMask
- Returns
SNPE_SUCCESS if the level was set successfully.
-
bool setDiagLogMask(const DlSystem::String &mask)¶
Allows for setting the log mask once diag logging has started.
- Parameters
mask – [in] : DiagLogMask
- Returns
SNPE_SUCCESS if the level was set successfully.
-
bool start(void)¶
Enables logging. Logging should be started prior to the instantiation of other SNPE_APIs to ensure all events are captured.
- Returns
SNPE_SUCCESS if diagnostic logging started successfully.
-
bool stop(void)¶
Disables logging.
- Returns
SNPE_SUCCESS if logging stopped successfully. Error code otherwise.
-
class OptionsInternal¶
Public Functions
-
OptionsInternal()¶
-
const char *getDiagLogMask() const¶
Gets DiagLogMask diagLogMask: Enables diag logging only on the specified area mask.
- Returns
diagLogMask as a const char*
-
void setDiagLogMask(const char *diagLogMask)¶
Sets DiagLogMask diagLogMask: Enables diag logging only on the specified area mask.
- Parameters
handle – [in] : Handle to access Options object
diagLogMask – [in] : specific area where logging needs to be enabed
-
const char *getLogFileDirectory() const¶
Gets logFileDirectory logFileDirectory: The path to the directory where log files will be written. The path may be relative or absolute. Relative paths are interpreted.
- Returns
logFileDirectory as a const char*
-
void setLogFileDirectory(const char *logFileDirectory)¶
Sets logFileDirectory logFileDirectory: The path to the directory where log files will be written. The path may be relative or absolute. Relative paths are interpreted.
- Parameters
logFileDirectory – [in] : path for saving the log files
-
const char *getLogFileName() const¶
Gets logFileName logFileName: The name used for log files. If this value is empty then BaseName will be used as the default file name.
- Returns
logFileName as a const char*
-
void setLogFileName(const char *logFileName)¶
Sets logFileName logFileName: The name used for log files. If this value is empty then BaseName will be used as the default file name.
- Parameters
logFileName – [in] : name of log file
-
uint32_t getLogFileRotateCount() const¶
Gets the maximum number of log files to create. If set to 0 no log rotation will be used and the log file name specified will be used each time, overwriting any existing log file that may exist.
- Returns
max log files to create
-
void setLogFileRotateCount(uint32_t logFileRotateCount)¶
Sets the maximum number of log files to create. If set to 0 no log rotation will be used and the log file name specified will be used each time, overwriting any existing log file that may exist.
- Parameters
logFileRotateCount – [in] : max log files to create
-
bool getLogFileReplace() const¶
If the log file already exists, control whether it will be replaced.
- Returns
1 if log file will be replaced, 0 otherwise
-
void setLogFileReplace(bool logFileReplace)¶
If the log file already exists, control whether it will be replaced.
- Parameters
logFileReplace – [in] : 1 if log file to be replaced, 0 otherwise
-
OptionsInternal()¶
-
bool setOptions(const Options &loggingOptions)¶
-
class IDiagLog¶