summaryrefslogtreecommitdiff
path: root/lib/common
Commit message (Collapse)AuthorAge
* Support microsecond timestamps for files on Linux.Chris Wilson2014-04-09
|
* Always flush any incoming stream on server side.Chris Wilson2014-03-02
| | | | | | | | | | Otherwise the protocol might be broken and can't be used any more, even if we made an effort to return an Error reply instead of throwing an exception. This used to not be a problem because an Error reply would terminate the connection anyway, but it no longer does. So if the client also didn't terminate, but tried to handle the exception and keep using the connection, then it might find that its next command fails because the protocol is broken.
* Fix compile error in MemBlockStream.Chris Wilson2014-02-11
| | | | | | Fix test/common memory leak checks now that MemBlockStream allocates another block.
* Simplify C++ name demangling code, and its memory allocation tracking.Chris Wilson2014-02-11
|
* Add a TEST_THAT_THROWONFAIL macro that throws an AssertFailed exception.Chris Wilson2014-02-11
| | | | Allows aborting tests from any depth of function calls.
* Give tests access to the list of tests requested by the user.Chris Wilson2014-02-11
|
* Add a MemBlockStream constructor from a simple string.Chris Wilson2014-02-11
| | | | | | Useful for sending simple string messages through Protocols or writing them to streams. Takes a copy of the string, so you don't need to worry about object lifetime.
* Record mallocs that happen while the memleak finder is disabled.Chris Wilson2014-02-11
| | | | | | | | Track them as not leaks, and suppress warnings about realloc() and free() on these blocks, because they are actually tracked. Add missing "throw (std::bad_alloc)" to "operator new" to silence warnings from the llvm compiler.
* Update copyright to 2014.Chris Wilson2014-02-10
|
* Include the filename in NamedLock exception messages.Chris Wilson2014-02-10
|
* Allow a logging tagger to temporarily replace the current tag.Chris Wilson2014-02-08
| | | | | | Sometimes useful to replace instead of appending to the current tag. The old tag will be reinstated when the tagger is destroyed.
* Add a logging guard that temporarily enables tagging on the console.Chris Wilson2014-02-08
| | | | | This is useful for disambiguating messages coming from different parts of the application when looking at console output.
* Allow checking whether console logging is currently tagged.Chris Wilson2014-02-08
|
* Allow InvisibleTempFileStream to take a std::string.Chris Wilson2014-02-07
| | | | For C++ style.
* Include filename in FileStream exception messages.Chris Wilson2014-02-07
| | | | Helps with debugging based on exception messages alone.
* Close syslog before checking for files left open in tests.Chris Wilson2014-02-07
| | | | Otherwise we might detect the opened syslog socket as a leaked file descriptor.
* mSubType is unsigned, so clang complains that it can't be less than zero.Chris Wilson2013-09-28
|
* Add calloc() support to memory leak finder.Chris Wilson2013-09-19
|
* Set process title on Windows.Chris Wilson2013-08-25
| | | | | | Thanks to Arnaud for submitting the patch: "I propose a little patch to enable the SetProcessTitle function on windows system."
* Add ability to generate memory usage reports while running.Chris Wilson2013-02-13
| | | | | | | | | | | | * ./configure CXXFLAGS=-DDEBUG_LEAKS * Build and run the binary as normal (release or debug) * Send SIGUSR1 to the process (e.g. killall -USR1 bbstored) * Check the system logs, or the console. Not safe for use on a production process, as it does illegal things in a signal handler that may result in the process hanging. Use only for debugging, and be prepared to kill any stuck processes.
* Allow getting the standard Console and Syslog loggers. Add a Guard classChris Wilson2012-11-27
| | | | | that can be used to protect against permanent changes to their log levels.
* Fix duplicate tagging of housekeeping messages.Chris Wilson2012-11-17
|
* Use more efficient direct reset of Timers instead of assignment.Chris Wilson2012-11-17
|
* Fix timer miscalculation on Windows.Chris Wilson2012-11-17
|
* Allow constructing an empty MemBlockStream, as it's useful for tests.Chris Wilson2012-11-08
|
* Fix incorrect logging of timer assignment, and format expiry time as a human ↵Chris Wilson2012-11-07
| | | | time.
* Refactor and improve timer trace logging, fix subsecond formatting error.Chris Wilson2012-11-07
|
* BOX_FORMAT_MICROSECONDS doesn't make sense unless the digits to the rightChris Wilson2012-11-07
| | | | | of the decimal point are padded properly.
* Log the number of nanoseconds left to sleep, otherwise the log messagesChris Wilson2012-11-07
| | | | | don't make sense.
* Convert FORMAT_MICROSECONDS into a global utility macro.Chris Wilson2012-11-06
|
* Add helper methods to get read-only access to the buffer, and its size,Chris Wilson2012-10-22
| | | | | wrapped by a MemBlockStream.
* Add a comment in header to indicate that StreamableMemBlock does not Chris Wilson2012-10-22
| | | | | | read/write raw memory blocks, but blocks with a header indicating their size, which is not always what we want.
* Add helper method to read a value that might not be present in an ArchiveChris Wilson2012-10-22
| | | | | (end of Archive) to avoid duplicating this code many times.
* Allow UnixUser to be created with a std::string for C++ style.Chris Wilson2012-06-29
|
* Fix bug that caused sending a ZeroStream to end early, breaking protocol.Chris Wilson2012-04-28
|
* Allow hiding specific exceptions to keep test output cleaner.Chris Wilson2012-04-28
|
* Add experimental "TCP Nice" mode, disabled by default.Chris Wilson2012-02-12
|
* Make box_time_t signed so that we can subtract them without getting silly ↵Chris Wilson2012-02-02
| | | | answers.
* Allow overriding Logging::Guard to dump stack backtraces as well.Chris Wilson2012-01-23
|
* Log exceptions with backtrace even if suppressed when log level is ↵Chris Wilson2012-01-23
| | | | | | | Log::EVERYTHING also for exceptions with messages.
* Log messages on failure to read, write, stat, seek and close files, with the ↵Chris Wilson2012-01-22
| | | | filename.
* Remove unnecessary GetNativeErrorMessage(), add BOX_LOG_SOCKET_ERROR macro.Chris Wilson2012-01-22
|
* File modification time helper functions don't need to modify their ↵Chris Wilson2012-01-22
| | | | arguments, so make them const.
* Allow getting the message out of a BoxException.Chris Wilson2012-01-22
|
* Allow log level "everything" to log exceptions even if suppressed.Chris Wilson2012-01-22
|
* Log disabling of exception logging to help understand test output.Chris Wilson2012-01-22
| | | | | Allow std::ostringstream formatting in expected/actual output comparison.
* Fix regex case issues on Windows (\S converted to \s for example). Ensure thatChris Wilson2011-12-03
| | | | | filename comparison is always case insensitive on Windows, by convention.
* Avoid recompiling everything on MSVC when BoxVersion.h changes.Chris Wilson2011-10-25
|
* Fix illegal use of Logging::Add and Logging::Remove while iterating over loggersChris Wilson2011-10-11
|
* Log fatal exceptions in main helper using BOX_FATAL instead of printf, toChris Wilson2011-10-09
| | | | | ensure they get logged in all the right places.