Skip to content

Commit

Permalink
Replaced LOGGERs by FARAO Loggers in CimCracImporter (#768)
Browse files Browse the repository at this point in the history
  • Loading branch information
bqth29 authored Jun 20, 2023
1 parent f432c6e commit 80b6ef0
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
import java.net.MalformedURLException;
import java.util.Objects;

import static com.farao_community.farao.commons.logs.FaraoLoggerProvider.BUSINESS_LOGS;
import static com.farao_community.farao.commons.logs.FaraoLoggerProvider.TECHNICAL_LOGS;

/**
* @author Godelaine de Montmorillon {@literal <godelaine.demontmorillon at rte-france.com>}
*/
Expand Down Expand Up @@ -70,12 +73,12 @@ public boolean exists(String s, InputStream inputStream) {
});

schema.newValidator().validate(xmlFile);
LOGGER.info("CIM CRAC document is valid");
BUSINESS_LOGS.info("CIM CRAC document is valid");
return FilenameUtils.getExtension(s).equals("xml");
} catch (MalformedURLException e) {
throw new FaraoException("URL error");
} catch (SAXException e) {
LOGGER.debug("CIM CRAC document is NOT valid. Reason: {}", e.getMessage());
TECHNICAL_LOGS.debug("CIM CRAC document is NOT valid. Reason: {}", e.getMessage());
return false;
} catch (IOException e) {
throw new UncheckedIOException(e);
Expand Down

0 comments on commit 80b6ef0

Please sign in to comment.