Logging summaries of parallel processes
It would be handy to have something like TransformerLogger but that acts as a temporary sink for all logging messages and then logs out a transformed message that summarizes the logging messages received. An example use-case is when one is executing some function in parallel on multiple threads. Each thread might be logging some warnings about the execution, but for 1,000 threads, showing all log messages would be useless. Instead it would be better to log the number of threads that raised each message.
Can something like this be accomplished with the existing structs in this package, or would a new one be necessary?
It probably can be done with a TransformerLogger + a closure/functor
which probably actually is the cleanest way to do it, since it lets you avoid worrying about the compositional machinery.
It would be complex enough it would be worth adding a helper function for it to this package I think. (or at least documenting it in https://julialogging.github.io/how-to/)
How would it know when to emit a log message? I guess it could track time since last print, and then when it got a new log message it would add it to its summary data structure, and if too much time has passed (configurable) print all messages + counts, then reset the time of last print and the datastructure