Logging: distinguish mem-allocation errors