mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2026-03-19 23:09:02 +00:00
Using logger instead of System.out
This commit is contained in:
@@ -7,11 +7,16 @@ import java.io.File;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class ConfigParser {
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(ConfigParser.class);
|
||||
|
||||
public static Config read(String location) {
|
||||
|
||||
System.out.println("reading config from " + location);
|
||||
LOG.debug("reading config from " + location);
|
||||
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
|
||||
@@ -27,11 +32,11 @@ public class ConfigParser {
|
||||
if (optionNode.getValue().isValueNode()) {
|
||||
config.setOption(optionNode.getKey(), optionNode.getValue().asText());
|
||||
} else {
|
||||
System.out.println("omitting non-value node " + optionNode.getKey());
|
||||
LOG.warn("omitting non-value node " + optionNode.getKey());
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
System.out.println(e.getMessage());
|
||||
LOG.error(e.getMessage());
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user