VCCC  2024.05
VisualCamp Common C++ library
log

Cross-platform logging library. More...

Detailed Description

Depends on Boost.Predef and Boost.PFR.
See LOGD, LOGI, LOGID, LOGW, LOGWD, LOGE, LOGED

Modules

 LOGD, LOGI, LOGID, LOGW, LOGWD, LOGE, LOGED
 

Classes

class  GlobalStreamWrapperSettings
 
class  Separator
 Set separator to vccc::BasicStreamWrapper. More...
 
class  Quoted
 Manipulator for adding quotation to strings(only to string and string_view) More...
 
class  ExpandAggregate
 Manipulator for expanding aggregate types. More...
 
class  ExpandArray
 Expand array instead of printing its value. More...
 
class  IOSFlagsSaver< Stream >
 RAII wrapper that restores stream's flags on destroyed. More...
 
class  Logger
 Ease use of vccc::StreamWrapper. More...
 
class  StreamManipulator
 Manipulator for vccc::StreamWrapper. More...
 
class  StreamWrapperBase< String, Stream >
 
class  BasicStreamWrapper< CharT, String, Stream >
 stream wrapper that supports extended operator overloading More...
 

Macros

#define VCCC_FUNCTION_DOXYGEN_HELPER
 VCCC_FUNCTION: platform-wide function name macro More...
 
#define VCCC_FILE_SEPARATOR   '/'
 file separator More...
 
#define PWD
 get current working directory More...
 

Typedefs

using StreamWrapper = BasicStreamWrapper< char >
 

Variables

constexpr VCCC_INLINE_OR_STATIC Logger Log
 Global vccc::Logger instance for syntax sugar. More...
 

Macro Definition Documentation

◆ PWD

#define PWD
Value:
[](){ \
std::string $13vlaae_dummy_str = __FILE__; \
return $13vlaae_dummy_str.substr( \
0, $13vlaae_dummy_str.find_last_of(VCCC_FILE_SEPARATOR)); \
}()
#define VCCC_FILE_SEPARATOR
file separator
Definition: pwd.hpp:27

returns current calling file's working directory.
This macro must be directly used in code where needed, or it will generate wrong output

◆ VCCC_FILE_SEPARATOR

#define VCCC_FILE_SEPARATOR   '/'
Platform value
Windows '\\'
Others '/'

◆ VCCC_FUNCTION_DOXYGEN_HELPER

#define VCCC_FUNCTION_DOXYGEN_HELPER

Use VCCC_FUNCTION instead of VCCC_FUNCTION_DOXYGEN_HELPER.
(lack of doxygen preprocessing parser)

Output is compiler-specific.
VCCC_FUNCTION is equal to one of the followings

  • __PRETTY_FUNCTION__
  • __FUNCSIG__
  • __func__
  • "unknown"
int main(){
std::cout << VCCC_FUNCTION << std::endl; // prints something like: int main()
return 0;
}
#define VCCC_FUNCTION

Typedef Documentation

◆ StreamWrapper

Variable Documentation

◆ Log

constexpr VCCC_INLINE_OR_STATIC Logger Log
constexpr