aboutsummaryrefslogtreecommitdiff
path: root/nxcomp/src/Log.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update Copyright yearsUlrich Sibiller2023-04-281-4/+4
| | | | Addresses ArcticaProject/nx-libs#985
* nxcomp/src/Log.cpp: don't confuse users with useless warning messages in ↵Mihai Moldovan2017-12-271-8/+12
| | | | case that a log line append operation was requested, but the message level has lower precedence than the current log filter.
* nxcomp/src/Log.{cpp,h}: provide infrastructure for appending to already ↵Mihai Moldovan2017-12-251-8/+45
| | | | | | | | | existing log lines. Also handle errors due to missing buffers gracefully. This error is surprisingly easy to trigger, so we should make sure that the program does not crash.
* nxcomp/src/Log.cpp: only create a new queue entry if we actually intend to ↵Mihai Moldovan2017-12-111-3/+3
| | | | | | write it out later. Fixes: ArcticaProject/nx-libs#596
* nxcomp/src/Log.cpp: add PID to thread ID output if requested.Mihai Moldovan2017-10-271-1/+2
| | | | | | | | The default function we use (if a thread name is not specified explicitly) is pthread_self(). This function returns a number that is guaranteed to be unique for each thread within a process, but this assertion doesn't hold globally. Hence only using the thread ID is ambiguous when logging from multiple processes.
* nxcomp/src/Log.{cpp,h}: port to std::stack as internal buffer structure.Mihai Moldovan2017-10-271-5/+3
| | | | | | | | This has one drawback: after flushing log data to its underlying output, a new NXLogStamp object MUST be written to the NXLog object in order to create a new entry within the stack. This can be changed if necessary. For now I'd like to keep it as-is.
* nxcomp/{configure.ac,Log.cpp}: implement configure-time std::put_time check ↵Mihai Moldovan2017-10-271-1/+2
| | | | and use macro value in Log.cpp.
* New logging implementationVadim Troshchinskiy2017-10-271-0/+121
Features: * Works without ifdefs * Configurable with commandline arguments * Log level configurable per file * Thread safe