Go to the documentation of this file.
55 typedef ::std::shared_ptr<::cras::LogHelper>
Ptr;
56 typedef ::std::shared_ptr<const ::cras::LogHelper>
ConstPtr;
130 uint32_t line,
const char*
function)
const = 0;
144 virtual const void*
getId()
const;
150 const char* file,
int line,
const char*
function,
const char* fmt, ...) const ROSCONSOLE_PRINTF_ATTRIBUTE(8, 9);
156 const
char* file,
int line, const
char* function, ::
std::
string fmt, ...) const;
162 const ::
std::stringstream& ss, const
char* file,
int line, const
char* function) const;
168 const
char* file,
int line, const
char* function) const;
170 [[deprecated("This function will be removed in a future release.")]]
179 [[deprecated("Use CRAS_* logging macros instead.")]]
188 [[deprecated("Use CRAS_* logging macros instead.")]]
196 [[deprecated("Use CRAS_* logging macros instead.")]]
216 const char*
function)
const override;
255 class [[deprecated("This wrapper should only be used to provide backward compatibility.")]]
266 const char*
function)
const override;
270 const void*
getId()
const override;
297 [[deprecated(
"This function will be removed in a future release.")]]
301 #include <cras_cpp_common/log_utils/deprecated/macros.h>
::ros::console::Level rosgraphMsgLevelToLogLevel(uint8_t msgLevel)
Convert the given rosgraph_msgs::Log level constant to rosconsole logging level.
virtual void initializeImpl() const =0
Initialize the logger. It is not needed to check initialized as this function is only called when it ...
This class (reps. its descendants) provides unified access to ROS logging functions,...
int8_t logLevelToRosgraphMsgLevel(::ros::console::Level rosLevel)
Convert the given rosconsole logging level to rosgraph_msgs::Log level constant.
::std::shared_ptr<::cras::LogHelper > Ptr
Pointer to LogHelper.
virtual void setLogLocationLevel(::ros::console::LogLocation *loc, ::ros::console::Level level) const
Set level of a log location. This is only called when global logging level changes.
virtual void initializeLogLocationImpl(::ros::console::LogLocation *loc, const std::string &name, ::ros::console::Level level) const =0
Initialize the given log location with proper data for later use. This function is only called if the...
const ::cras::LogHelper * wrapped
void initializeLogLocation(::ros::console::LogLocation *loc, const std::string &name, ::ros::console::Level level) const
Initialize the given log location with proper data for later use. This is the function called from ma...
Convenience base class for providing this->log and getCrasLogger(). Just add it as a base to your cla...
ROS logging helpers macros. Do not include this file directly. Include log_utils.h instead....
inline ::std::string format(::std::string format,...)
Utils for working with strings.
virtual const void * getId() const
Return a unique identifier of this logger. These IDs are used for determining which logger has alread...
::std::shared_ptr< const ::cras::LogHelper > ConstPtr
Const pointer to LogHelper.
::cras::LogHelperConstPtr getCrasLogger()
Get the default logger used for CRAS_* logging macros. It will never be null.
::cras::LogHelperConstPtr setCrasLogger(const ::cras::LogHelperConstPtr &log)
Set the default logger used by CRAS_* macros.
virtual ::ros::Time getTimeNow() const
Get current time (used for throttling messages). By default, ROS time is returned,...
bool initialized
Whether initialize() has been called at least once. Subclasses are required to handle this invariant.
virtual void checkLogLocationEnabled(::ros::console::LogLocation *loc) const
Check whether the log location is enabled.
void log(::ros::console::Level level, const char *format,...) const
Log a message using the given log severity.
friend class WrapperLogHelper
void print(::ros::console::FilterBase *filter, void *logger, ::ros::console::Level level, const char *file, int line, const char *function, const char *fmt,...) const ROSCONSOLE_PRINTF_ATTRIBUTE(8
Print function used by the macros. It basically just relays its work to logString().
::cras::LogHelper::Ptr LogHelperPtr
Pointer to LogHelper.
Log helper relaying all of its work to the same mechanism used by ROS_* logging macros.
virtual void logString(void *logger, ::ros::console::Level level, const ::std::string &str, const char *file, uint32_t line, const char *function) const =0
Write the given string to the log.
::cras::LogHelper::ConstPtr LogHelperConstPtr
Const pointer to LogHelper.
void initialize() const
Initialize the logger. This function does what it needs and then calls initializeImpl().
::cras::LogHelperPtr log
Log helper.
void setGlobalLogger() const
LogHelper & operator=(const LogHelper &)=delete
virtual ~LogHelper()=default
void restorePreviousCrasLogger()
cras_cpp_common
Author(s): Martin Pecka
autogenerated on Tue Nov 5 2024 03:50:30