Documentation for microsoft::quantum::LogCollection
microsoft::quantum::LogCollection
#include <Logging/LogCollection.hpp>
Inherits from microsoft::quantum::ILogger
Public Functions
| Name | |
|---|---|
| virtual void | debug(String const & message) override Adds a debug message to the list. |
| virtual void | info(String const & message) override Adds an info message to the list. |
| virtual void | warning(String const & message) override Adds a warning message to the list. |
| virtual void | error(String const & message) override Adds an error message to the list. |
| virtual void | internalError(String const & message) override Adds an internal error message to the list. |
| virtual void | setLocation(SourceLocation const & loc) override Function that allows to set the current location. |
| virtual void | setLlvmHint(String const & value) override Sets the value of the LLVM instruction causing the issue. |
| virtual void | setFrontendHint(String const & value) override Sets the value of the frontend instruction causing the issue. |
| virtual Messages const & | messages() const override Accessor to the messages. |
| virtual void | dump(std::ostream & out) const override Enabling dumping collection to a file. |
Additional inherited members
Public Classes inherited from microsoft::quantum::ILogger
| Name | |
|---|---|
| struct | Location Class that holds the location of where the incident happened. |
| struct | Message Struct to hold a message together with its type and location. |
Public Types inherited from microsoft::quantum::ILogger
| Name | |
|---|---|
| enum class | Type { Debug, Info, Warning, Error, InternalError} Enum description what type of information we are conveying. |
| using llvm::Value | Value |
| using std::function< SourceLocation(Value const *)> | LocationResolver |
| using std::function< SourceLocation(String const &)> | LocationFromNameResolver |
| using std::shared_ptr< ILogger > | ILoggerPtr |
| using std::vector< Message > | Messages List of messages defined as alias. |
Public Functions inherited from microsoft::quantum::ILogger
| Name | |
|---|---|
| ILogger() =default | |
| ILogger(ILogger const & ) | |
| ILogger(ILogger && ) | |
| ILogger & | operator=(ILogger const & ) |
| ILogger & | operator=(ILogger && ) |
| virtual | ~ILogger() |
| void | setLocationFromValue(llvm::Value const * value) Sets the logger position based on a LLVM value. |
| void | setLocationFromFunctionName(String const & name) Sets the logger position based on function name. |
| void | setLocationResolver(LocationResolver const & r) Sets a resolver which that translates a LLVM value into a position in the source. |
| void | setLocationFromNameResolver(LocationFromNameResolver const & r) Sets a resolver which that translates function name into a position in the source. |
| SourceLocation | resolveLocation(llvm::Value const * value) Returns a source location from the value pointer (if possible) |
| bool | hadErrors() const Whether or not errors were logged. |
| bool | hadWarnings() const Whether or not warnings were logged. |
| void | errorWithLocation(String const & message, llvm::Value * ptr =nullptr) |
| void | warningWithLocation(String const & message, llvm::Value * ptr =nullptr) |
| virtual void | errorCouldNotDeleteNode(llvm::Value * ptr =nullptr) Standard messages. |
| virtual void | errorExpectedStraightLineCodeMultipleFunctions(llvm::Value * ptr =nullptr) |
| virtual void | errorExpectedStraightLineCodeMultipleBlocks(llvm::Value * ptr =nullptr) |
| virtual void | errorReleaseFailNonStandardAlloc(llvm::Value * ptr =nullptr) |
| virtual void | warningReleasePhiNodeQubit(llvm::Value * ptr =nullptr) |
| virtual void | errorFunctionInliningMaxRecursion(uint64_t n, llvm::Value * ptr =nullptr) |
| virtual void | errorNoQubitsPresent(llvm::Value * ptr =nullptr, String const & name ="unnamed") |
| virtual void | errorNoResultsPresent(llvm::Value * ptr =nullptr, String const & name ="unnamed") |
| virtual void | errorOpcodeNotAllowed(String const & code, String const & target_name, llvm::Value * ptr =nullptr) |
| virtual void | errorCustomFunctionsNotAllowed(llvm::Value * ptr =nullptr) |
| virtual void | errorExternalCallsNotAllowed(String const & function_name, String const & target_name, llvm::Value * ptr =nullptr) |
| virtual void | errorTypeNotAllowed(String const & type_name, String const & target_name, llvm::Value * ptr =nullptr) |
| virtual void | errorPoisonNotAllowed(String const & target_name, llvm::Value * ptr =nullptr) |
| virtual void | errorUndefNotAllowed(String const & target_name, llvm::Value * ptr =nullptr) |
| virtual void | errorExpectedStringValueForAttr(String const & function_name, String const & attr_name) |
| virtual void | warningWeakLinkReplacementNotPossible(String const & function_name, String const & replacement) |
| virtual void | errorReplacementSignatureMismatch(String const & function_name, String const & signature1, String const & signature2) |
Protected Functions inherited from microsoft::quantum::ILogger
| Name | |
|---|---|
| void | setHasErrors(bool value) |
| void | setHasWarnings(bool value) |
Detailed Description
class microsoft::quantum::LogCollection;
Concrete ILogger implementation that collects all messages and their corresponding location in a list that can be traversed later on.
Public Functions Documentation
function debug
virtual void debug(
String const & message
) override
Adds a debug message to the list.
Reimplements: microsoft::quantum::ILogger::debug
function info
virtual void info(
String const & message
) override
Adds an info message to the list.
Reimplements: microsoft::quantum::ILogger::info
function warning
virtual void warning(
String const & message
) override
Adds a warning message to the list.
Reimplements: microsoft::quantum::ILogger::warning
function error
virtual void error(
String const & message
) override
Adds an error message to the list.
Reimplements: microsoft::quantum::ILogger::error
function internalError
virtual void internalError(
String const & message
) override
Adds an internal error message to the list.
Reimplements: microsoft::quantum::ILogger::internalError
function setLocation
virtual void setLocation(
SourceLocation const & loc
) override
Function that allows to set the current location.
Reimplements: microsoft::quantum::ILogger::setLocation
function setLlvmHint
virtual void setLlvmHint(
String const & value
) override
Sets the value of the LLVM instruction causing the issue.
Reimplements: microsoft::quantum::ILogger::setLlvmHint
function setFrontendHint
virtual void setFrontendHint(
String const & value
) override
Sets the value of the frontend instruction causing the issue.
Reimplements: microsoft::quantum::ILogger::setFrontendHint
function messages
virtual Messages const & messages() const override
Accessor to the messages.
Reimplements: microsoft::quantum::ILogger::messages
function dump
virtual void dump(
std::ostream & out
) const override
Enabling dumping collection to a file.
Reimplements: microsoft::quantum::ILogger::dump
Updated on 1 August 2023 at 16:25:10 UTC