Commit 981c49ae authored by LAVENIER's avatar LAVENIER
Browse files

[fix] Cache: better start log

parent 9584be5a
......@@ -46,7 +46,7 @@ public class ExtractionCacheConfiguration {
@Autowired
protected ExtractionCacheConfiguration(CacheConfiguration cacheConfiguration) {
this.cacheManager = cacheConfiguration.getCacheManager();
log.info("Adding Extraction caches...");
log.info("Adding {Extraction} caches...");
}
@Bean
......
......@@ -119,7 +119,7 @@ public class ExtractionRestController {
@PostConstruct
public void init() {
log.info("Starting Extraction endpoint {{}}...", BASE_PATH);
log.info("Starting extraction endpoint {{}}...", BASE_PATH);
}
@GetMapping(
......
......@@ -46,7 +46,7 @@ public class RdfCacheConfiguration {
@Autowired
protected RdfCacheConfiguration(CacheConfiguration cacheConfiguration) {
this.cacheManager = cacheConfiguration.getCacheManager();
log.info("Adding RDF caches...");
log.info("Adding {RDF} caches...");
}
@Bean
......
......@@ -238,10 +238,10 @@ public class SumarisConfiguration extends PropertyPlaceholderConfigurer {
String dbTimeZone = applicationConfig.getOption(SumarisConfigurationOption.DB_TIMEZONE.getKey());
if (StringUtils.isNotBlank(dbTimeZone)) {
if (log.isInfoEnabled()) {
log.info(String.format("Using timezone [%s] for database", dbTimeZone));
log.info("Using timezone {{}} for database", dbTimeZone);
}
} else if (log.isInfoEnabled()) {
log.info(String.format("Using default timezone [%s] for database", System.getProperty("user.timezone")));
log.info("Using default timezone {{}} for database", System.getProperty("user.timezone"));
}
}
......
......@@ -53,6 +53,8 @@ public class CacheConfiguration {
protected void init() {
log.info("Starting cache manager...");
if (this.cacheManager == null) this.cacheManager = ehcache();
log.info("Adding {Core} caches...");
}
public CacheManager getCacheManager() {
......
......@@ -294,18 +294,18 @@ public class SumarisServerConfiguration extends SumarisConfiguration {
String timeZone = applicationConfig.getOption(SumarisConfigurationOption.TIMEZONE.getKey());
if (StringUtils.isNotBlank(timeZone)) {
log.info(String.format("Using timezone [%s]", timeZone));
log.info("Using timezone {{}}", timeZone);
TimeZone.setDefault(TimeZone.getTimeZone(timeZone));
System.setProperty("user.timezone", timeZone);
} else {
log.info(String.format("Using default timezone [%s]", System.getProperty("user.timezone")));
log.info("Using default timezone {{}}", System.getProperty("user.timezone"));
}
String dbTimeZone = applicationConfig.getOption(SumarisConfigurationOption.DB_TIMEZONE.getKey());
if (StringUtils.isNotBlank(dbTimeZone)) {
log.info(String.format("Using timezone [%s] for database", dbTimeZone));
log.info("Using timezone {{}} for database", dbTimeZone);
} else {
log.info(String.format("Using default timezone [%s] for database", System.getProperty("user.timezone")));
log.info("Using default timezone {{}} for database", System.getProperty("user.timezone"));
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment