Added support for logging in memory