mirror of https://github.com/OpenVidu/openvidu.git
openvidu-server: geolocation log fix
parent
4e81e6b600
commit
5889fdd449
|
@ -40,12 +40,12 @@ public class GeoLocationByIpUtils {
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
public void init() {
|
public void init() {
|
||||||
try {
|
try {
|
||||||
log.info("GeoLocationByIpUtils: Trying to load GeoLite2-City database...");
|
log.info("Trying to load GeoLite2-City database...");
|
||||||
Resource resource = resourceLoader.getResource("classpath:GeoLite2-City.mmdb");
|
Resource resource = resourceLoader.getResource("classpath:GeoLite2-City.mmdb");
|
||||||
InputStream dbAsStream = resource.getInputStream();
|
InputStream dbAsStream = resource.getInputStream();
|
||||||
// Initialize the reader
|
// Initialize the reader
|
||||||
reader = new DatabaseReader.Builder(dbAsStream).fileMode(Reader.FileMode.MEMORY).build();
|
reader = new DatabaseReader.Builder(dbAsStream).fileMode(Reader.FileMode.MEMORY).build();
|
||||||
log.info("GeoLocationServiceImpl: Database was loaded successfully");
|
log.info("Database was loaded successfully");
|
||||||
} catch (IOException | NullPointerException e) {
|
} catch (IOException | NullPointerException e) {
|
||||||
log.error("Database reader cound not be initialized", e);
|
log.error("Database reader cound not be initialized", e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue