Skip to content

Releases: 3Hren/blackhole

Kargath Bladefist

13 Jan 11:48
Compare
Choose a tag to compare

Features

  • Combined logger concept.
    Now all loggers - are just sets of features combined in a single logger object. When specializing combined logger, you should specify additional parameters, by which filtering should occur when opening a record and before they will be merged with internal attributes set. For example you may specify no additional parameters and you get the simplest logger case. Another case - when you want to perform early filtering by verbosity level you can just specify its type with combination of base logger and the filtering function will require that level type.
  • Filtering policies, which provide almost costless filtering.
    A composite logger accepts additional policy parameter instead of mixed type and its argument pack. All methods, that opens a record now accepts variadic pack which is forwarded to that policy.
    Additional attributes insertion into an internal set can be implemented using population trait, which is provided as first template parameter in a filtering policy.
  • Threading policy support for logger.
    A composite logger can be configured with desired threading policy. That means if the logger doesn't require internal synchronization, it won't do it (if the corresponding policy is provided).
  • Internal attributes attachment as a feature.
    Every project should define which of internal attributes (PID, TID, etc.) should be attached to every logging event.

Bug fixes

  • Fix string literal warnings on some ancient compilers.
  • Workaround GCC 4.4 pragmas.
  • Checking frontend set emptiness is now always under the lock.

API

  • It's possible to forward all required arguments to final logger's constructor, while creating it through a repository.
  • Logger's move constructor, move assignment operator and swap function no longer contain noexcept specifications, because given methods actually can throw.
    This is a breaking change.
  • Disabled tracking feature, because it shouldn't be in a logger itself, but somewhere else.
    This is a breaking change.
  • Verbose logger concept review.
    No longer possible to open verbose logger's record without specifying severity level. This is required due to fact, that there is a primary filtering now, which strongly required severity level provided. Moreover there can be user specific filtering function that be cannot ignore.
  • Proper verbose logger initialization with a given severity level.
    No longer possible to initialize verbose logger with garbage level value, because user specific severity enumeration may start with any value.
    Instead of this, the User if forced to provide severity threshold explicitly. Verbosity threshold should always be specified, when setting verbosity to a logger, even with filtering function.
    This is a breaking change.
  • Drop global logger attribute set.
    After half year of user experience I've realized that nobody uses logging-attached attributes. The main reason of it - because of Wrappers. You can create logger wrapper, attach some attributes and work with it without copying underlying logger resources like file descriptors or sockets.
    As a result - you can have only one logger for application, but with multiple wrappers. This is a big advantage, but this is a breaking change.
  • Dropped logger concept classes, because it was inconvenient and buggy.
    This is a breaking change.
  • Redesign invalid record concept.
    When opening a record there is a non-zero chance, that you will receive an empty record with no attributes attached. Previously it was considered as invalid record, because there was at least pid and tid attributes attached. But now seems to be there is no need to attach internal attributes before filtering. However now it is considered as valid, just without attributes.
    This is a breaking change.
  • Filtering function parameters review.
    Logging filtering function now accepts lightweight combined attribute set view. Technically it allows to perform faster filtering, because there is no need to construct combined set - it will be constructed only if the filtering succeed.
    This is a breaking change.
  • Deprecated file blackhole/log.hpp file is no longer part of public API, just as planned.
    This is a breaking change.

Other

  • Internal and external attribute sets initial capacity can be configured using macro variables.
  • Clang support on non OS X targets.
  • Documentation has been slightly changed and restyled.
  • Code coverage analyze using lcov util.
    No more words, just type make coverage and you will see.
  • No longer fetch gtest/gmock as submodules.
    Now these helpful frameworks are obtained via cmake download feature.
  • No longer fetch benchmarking framework as submodule. Instead of that, cmake download feature is used.

Performance

  • Changed attribute set underlying representation.
    Now attribute set is internally represented as vector of pairs. This change allows to keep attributes in single memory block, which is good for caching and performance.
    On the other hand attribute lookup time by user attributes may increase, because they are scanned using linear search. Also I don't see any need for handling duplicates, so now there can be duplicates (which actually can be eaten if needed).
    There are two attributes sets in every record: internal and external. Internal attributes is setting by logger itself: message, severity, timestamp, pid, tid or lwp. All attributes that is configured via scoped sets or wrappers - are external. This distribution allows me in the future to map each internal attribute with its unique number to perform even more faster table lookup.
    This change increases performance of almost every case by approximately 20-30%.
  • Got rid of several unnecessary file includes, which saves some compile time.
  • Avoid unnecessary string copying or moving when comparing attributes.
  • Explicitly move the value when opening a record with a single attribute.

Testing

  • Added multithreaded scalability benchmarks.
  • Added huge number of benchmarks (approximately 300), that test every possible combination of cases.
    These are generated using preprocessor magic.
  • Fixed possible conditional jump.
    To check results from functions, which can go the wrong way - is a good idea! Sometimes strftime cannot fill provided buffer completely, because of initial format, for example.
    The best way for testing environment is to abort program execution and extend the buffer needed to match all cases.
  • Fixed comparing signed with signed and vise versa.
  • Fixed broken resolver test.

Murmur

17 Nov 10:22
Compare
Choose a tag to compare

Bug fixes

  • Fixed improper type mapping by name.

When registering Cartesian product of all possible formatters and sinks with the factory, they are internally mapped into typeid structure to be able to extract proper type factory by its name or by user-defined mapper trait.

Accidentally I've just forgot to write proper code for default case (mapping by entity name). Now the default type mapping checks whether type name is equal with the given one.

Murky

29 Oct 09:57
Compare
Choose a tag to compare

Bug fixes

  • Fixed improper attributes routing.

Accidentally all wrapper-attached attributes were routed to the internal section, which contain only internal attributes, like timestamp, severity or message.

Internal attributes are not shown in variadic placeholders, but all user-defined attributes should.

Epicus Maximus

28 Oct 13:06
Compare
Choose a tag to compare

Features

  • String formatter now has optional placeholder, which can be fully ignored by the library, when it's not present in a record.
  • String formatter now can be configured with prefix, suffix and separator while using optional or variadic placeholders.
  • String formatter has learned some convenient error-handling magic and can tell the User where and what type of error has happened.
  • It's now possible to represent time value structure in local timezone.
  • Any logger-compatible type (based on logger_base_t) can be created through a repository.
  • Use compiler extension (cross-platform nonetheless) to check log message format correctness in compile time.
  • The library now widely uses deprecated attribute feature, which allows to reduce from version to version migration pain.

Bug fixes

  • Process id attribute is back and its extraction is much cheaper.
  • Message attribute should no longer hangs out with external attributes.
  • Fixed typo in GCC 4.6 detection macro.

API

  • Log record has been completely refactored (and documented).
  • Completely dropped all scope-specific stuff. Actually, there are three scopes left, but its management is fully incapsulated into the library.
  • Completely dropped blackhole::log::* namespace, because it's already the Logging Library.
  • Logger wrapper can now provide const reference to the underlying logger.
  • Dropped 'in situ' substitution mechanism for keyword attributes, because it is creepy and useless.
  • Base config objects now return const references instead of copying.

Other

  • Allow to use '_' symbol in placeholder name.
  • Fixed compatibility with GCC 4.4, which emitted false-positive warning.
  • Attribute value holders are now comparable.
  • Frontend factory now has more convenient interface.
  • Blackhole should no longer propagate exception raised from boost::format, while formatting message string. Instead of this an exception reason will be printed as message.
  • Using specialized exception instead of more generic while parsing configuration object.
  • Added logger trait concept.
  • More forward declarations, which may be useful with compile time reducing.
  • A lot of documentation added.

Performance

  • Pack feeder now has overload that accepts string literal, which allows to avoid unnecessary transformations.
  • Multiple attribute sets is aggregated into single view class, so attribute lookup is performed lazily when it is needed by someone.
  • String formatter now internally uses ADT instead of packed functions.
  • Accelerated variadic placeholder handling in string formatter by approximately 30% via avoiding unnecessary string transformations.

Testing

  • A log of unit tests added as like as benchmarks.

Weaver

16 Oct 16:27
Compare
Choose a tag to compare

Bug fixes

  • fixed debian control especially for precise.

Captain Cookie

24 Sep 11:15
Compare
Choose a tag to compare

Features

  • Added move watcher for file sink, which can automatically reopen files after they were moved.

Edwin VanCleef

24 Sep 11:12
Compare
Choose a tag to compare

Bug fixes

  • Verbose logger should now properly copy level value when moving.

Hakkari the Blood God

18 Aug 11:52
Compare
Choose a tag to compare

Features

  • Elasticsearch sink - allows to send logging events directly to that storage.
  • Scoped attributes holder - automatically adds specified attributes to the logger while in its scope.
  • Logger adaptor - keeps some attributes until lives.
  • Tracing framework - closely integrates with the logging system.
  • Configuration parser can properly handle arrays.
  • Logger frontends are now thread-aware.
  • Streaming sink now allows to use custom std::stream.
  • Logger object's internal state is now thread-safe.
  • Added default severity and its mapping function.

Bug fixes

  • Long and unsigned long values can now be used as attributes.
  • Fixed misleading error message when failed to instantiate formatter.
  • Fixed undefined behaviour in syslog sink.
  • Some conditional memory jumps fixed.
  • TCP write handler will now block until the message is completely sent.
  • Fixed deadlock while invoking move assigning in logger wrapper.
  • Forgotten configuration include added.
  • Fixed mapping of debug severity to string.

Other

  • Changed license to MIT.
  • Relax local attributes transition to the record.
  • Opening verbose logger's level type.
  • Added macro variable to determine if the platform has c++11 random library.
  • Start using implementation files (ipp), which allows to build library in the future.
  • Verbose logger now can keep bound verbosity level and filter by it.
  • No longer use boost::filesystem deprecated API.
  • Let the compiler deduce swap function it needs to use.
  • Migrated from boost::any to boost::variant configuration.
  • More forwards added.
  • Disable trace collecting by default.
  • Use lightweight process id (LWP) on Linux instead of thread id.
  • Logger can now provide its tracking state outside.
  • Moving BLACKHOLE_HEADER_ONLY declaration to the config file.
  • Disable tests and examples by default.
  • Logger wrapper's constructor overload now accepts other const wrapper's reference instead of non-const one.
  • Changed namespace of DECLARE_EVENT_KEYWORD.
  • Using new benchmarking framework for regression tests.
  • Default mapping from default severity to syslog one.
  • Default warning severity mapping to string has been slightly changed.
  • Change priority of attribute sets while merging.
  • Scoped attributes constructor now has more strictly wrapper concept check.
  • Added DECLARE_LOCAL_KEYWORD macro.

Examples

  • Added example using Elasticsearch sink.

Testing

  • Testing frameworks are now included as submodules.
  • Continious integration is used more widely, tests and examples should now be built separately.
  • Benchmark added to measure full logger event lifecycle.
  • Open access to backend variables for mocking purpose.
  • More tests for wrapper.
  • Added datetime generator, string formatter and other benchmarks.
  • Added tests to check priority of categorized attribute sets.

Hungry Torso

30 Apr 15:05
Compare
Choose a tag to compare

From this point a strong version control begins.