logger: reduce ram usage