Refactorizado el logging.