Added support in the logstream class for maximum amount of warnings before aborting.