irods  4.2.8
About: iRODS (the integrated Rule Oriented Data System) is a distributed data-management system for creating data grids, digital libraries, persistent archives, and real-time data systems.
  Fossies Dox: irods-4.2.8.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

irods_log.cpp
Go to the documentation of this file.
1 #include "irods_log.hpp"
2 #include "rodsLog.h"
3 
4 namespace irods {
5  void log(const int _level, const std::string& _msg) {
6  rodsLog(_level, "%s", _msg.c_str());
7  }
8 
9  void log(const int _level, const char *s) {
10  rodsLog(_level, "%s", s);
11  }
12 
13  void log(const irods::error& _err) {
14  if (_err.ok()) {
15  log(LOG_NOTICE, _err.result());
16  } else {
17  log(LOG_ERROR, _err.result());
18  }
19  }
20 
21  void log(const irods::exception& e) {
22  log(LOG_ERROR, e.what());
23  }
24 }
rodsLog
void rodsLog(int level, const char *formatStr,...)
Definition: rodsLog.cpp:86
LOG_ERROR
#define LOG_ERROR
Definition: rodsLog.h:43
irods
Definition: apiHandler.hpp:35
terminate_irods_processes.e
e
Definition: terminate_irods_processes.py:19
rodsLog.h
irods::log
void log(const error &)
Definition: irods_log.cpp:13
LOG_NOTICE
#define LOG_NOTICE
Definition: rodsLog.h:33
irods::error
Definition: irods_error.hpp:23
irods::exception
Definition: irods_exception.hpp:15
irods::error::ok
bool ok()
Definition: irods_error.cpp:258
irods::error::result
std::string result() const
Definition: irods_error.cpp:201
irods_log.hpp