Skip to content

Commit

Permalink
Add function docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
abeltrano committed Feb 8, 2024
1 parent ce88ba0 commit ae5e6ff
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/common/shared/logging/include/logging/FunctionTracer.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,53 @@ struct FunctionTracer

virtual ~FunctionTracer();

/**
* @brief Print the function entry log message.
*/
void
Enter();

/**
* @brief Print the function exit log message.
*/
void
Exit();

/**
* @brief Add an argument to the function tracer. This value will be printed in the entry log message.
*
* @param name The name of the argument.
* @param value The value of the argument.
*/
void
AddArgument(std::string name, std::string value);

/**
* @brief Add a return value to the function tracer. This value will be printed in the exit log message.
*
* @param name The name of the return value.
* @param value The value of the return value.
*/
void
AddReturnValue(std::string name, std::string value);

/**
* @brief Mark that the function has succeeded. This will set the log verbosity to info.
*/
void
SetSucceeded() noexcept;

/**
* @brief Mark that the function has failed. This will set the log verbosity to error.
*/
void
SetFailed() noexcept;

/**
* @brief Manually set the log severity for the exit log message. This overrides the SetSucceeded and SetFailed methods.
*
* @param severity The log severity to use when printing the exit log message.
*/
void
SetExitLogSeverity(plog::Severity severity) noexcept;

Expand Down

0 comments on commit ae5e6ff

Please sign in to comment.