I have a Spring Boot application and for the log we are using the Logback library. As per project requirements it is necessary to add the log in JSON format so that it is possible to obtain metrics. This log must be added to the existing one and will be used in the same methods and for same level, but will log other information.

How is this situation handled? I add an example for clarity:

```
public class UserService {

private final Logger logger = LoggerFactory.getLogger(UserService.class);

public UserResponse getUser(UserRequest userRequest) {

    User user = userRepository.findById(userRequest.getId());

    //text log
    logger.info("User " + user.getFullName().toString() + " found");

    //json log to add
    LogInfo logInfo = new LogInfo(LocalDateTime.now(), getClass().getName(), user.getName(), user.getSurname(), ...);
    newLogger.info(logInfo);

    return new UserResponse(user);
    }
}

```