Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch for Ubuntu 22.04 #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions Logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,15 @@
// If timestr decl is changed G++ will whine when Utils.h is included.
namespace Utils { const std::string timestr(); };

#if !defined(gettid)
# define gettid() syscall(SYS_gettid)
#endif // !defined(gettid)
#if !defined(gettid2)
# define gettid2() syscall(SYS_gettid)
#endif // !defined(gettid2)

extern pid_t gPid;
#define _LOG(level) \
Log(LOG_##level).get() <<gPid <<":"<<gettid() \
<< Utils::timestr(100,true) << " " __FILE__ ":" << __LINE__ << ":" << __FUNCTION__ << ": "
Log(LOG_##level).get() <<gPid <<":"<<gettid2() \
<< Utils::timestr(100,true) << " " __FILE__ ":" << __LINE__ << ":" << __FUNCTION__ << ": "


// (pat) If you '#define LOG_GROUP groupname' before including Logger.h, then you can set Log.Level.groupname as well as Log.Level.filename.
#ifdef LOG_GROUP
Expand Down