#pragma once #include "level.h" #include "message.h" #if defined(_MSC_VER) #define log_here \ { __FILE__, __LINE__, __FUNCTION__, __FUNCSIG__ } #else #define log_here \ { __FILE__, __LINE__, __FUNCTION__, __PRETTY_FUNCTION__ } #endif namespace logging { struct location_info { char const * filename = "???"; int line = 0; char const * function = ""; char const * pretty_function = ""; }; struct logpacket { struct timeval time; // int thread_id; level level; location_info info; std::string logger; message message; }; #if defined(_WIN32) constexpr char const * const NEWLINE_TOKEN{"\r\n"}; #else constexpr char const * const NEWLINE_TOKEN{"\n"}; #endif }