The log messages are written to one or more loggers registered with the ResourceManager.
if(myErrorOccured) { // my annotator couldn't create a result file for this document: // report an error but continue execution getAnnotatorContext().getLogger().logError("Could not create result file"); // continue execution }
if(myErrorOccured) { // my annotator couldn't create a result file for this document: // report an error but continue execution // get a error log stream object LogStream & errStream = getAnnotatorContext().getLogger().getLogStream(LogStream::EnError); // stream out error message errStream << "Could not create result file" << strFilename << endl; errStream << "(continuing execution)"; // terminate error message errStream.flush(); // continue execution }
UIMA_LOG_STREAM_ERROR(getAnnotatorContext().getLogger(), "Could not create result file" << strFilename << endl << "(continuing execution)");
Public Member Functions | |
Constructors | |
LogFacility (icu::UnicodeString const &) | |
this constructor gets handle to the loggers from the ResourceManager and sets the mininum log level to INFO. | |
LogFacility (icu::UnicodeString const &, LogStream::EnEntryType level) | |
this constructor gets the handle to loggers from the ResourceManager. | |
~LogFacility () | |
Properties | |
const TCHAR * | getLastErrorAsCStr (void) const |
ErrorInfo const & | getLastError () const |
LogStream Functions | |
LogStream & | getLogStream (LogStream::EnEntryType enLogEntryType) |
void | flushLogStream () |
Log Functions | |
void | logMessage (const TCHAR *cpszMessage, long lUserCode=0) const |
Log the specified message together with a user-defined id. | |
void | logMessage (const std::string &crclMessage, long lUserCode=0) const |
Log the specified message together with a user-defined id. | |
void | logMessage (const icu::UnicodeString &crclMessage, long lUserCode=0) const |
Log the specified message together with a user-defined id. | |
void | logWarning (const TCHAR *cpszMessage, long lUserCode=0) const |
Log the specified warning together with a user-defined id. | |
void | logWarning (const std::string &crclMessage, long lUserCode=0) const |
Log the specified warning together with a user-defined id. | |
void | logWarning (const icu::UnicodeString &crclMessage, long lUserCode=0) const |
Log the specified warning together with a user-defined id. | |
void | logWarning (const ErrorInfo &crclErrorInfo) const |
Log the specified warning. | |
void | logError (const TCHAR *cpszMessage, long lUserCode=0) const |
Log the specified error together with a user-defined id. | |
void | logError (const std::string &crclMessage, long lUserCode=0) const |
Log the specified error together with a user-defined id. | |
void | logError (const icu::UnicodeString &crclMessage, long lUserCode=0) const |
Log the specified error together with a user-defined id. | |
void | logError (const ErrorInfo &crclErrorInfo) const |
Log the specified error. |
|
this constructor gets handle to the loggers from the ResourceManager and sets the mininum log level to INFO. This is used in the AnnotatorContext to create separate instances of the LogFacility for each annotator. |
|
this constructor gets the handle to loggers from the ResourceManager. This constructor is used by the framework ResourceManager |
|
|
|
|
|
|
|
|
|
|
|
Log the specified message together with a user-defined id.
|
|
Log the specified message together with a user-defined id.
|
|
Log the specified message together with a user-defined id.
|
|
Log the specified warning together with a user-defined id.
|
|
Log the specified warning together with a user-defined id.
|
|
Log the specified warning together with a user-defined id.
|
|
Log the specified warning.
|
|
Log the specified error together with a user-defined id.
|
|
Log the specified error together with a user-defined id.
|
|
Log the specified error together with a user-defined id.
|
|
Log the specified error.
|