Skip to content

Commit

Permalink
Specify logger names and levels
Browse files Browse the repository at this point in the history
  • Loading branch information
groldan committed Dec 6, 2023
1 parent e305a27 commit e9f53af
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

import lombok.extern.slf4j.Slf4j;

@Slf4j
@Slf4j(topic = "com.camptocamp.opendata.producer.geotools")
public class FeatureToRecord implements Function<SimpleFeature, GeodataRecord> {

private Map<CoordinateReferenceSystem, String> crsToSrs = new IdentityHashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import lombok.NonNull;
import lombok.extern.slf4j.Slf4j;

@Slf4j
@Slf4j(topic = "com.camptocamp.opendata.producer.geotools")
class GeoJsonFormat extends GeoToolsFormat {

private static final GeoJSONDataStoreFactory FACTORY = new GeoJSONDataStoreFactory();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
import lombok.ToString;
import lombok.extern.slf4j.Slf4j;

@Slf4j
@ToString
@Slf4j(topic = "com.camptocamp.opendata.producer.geotools")
public class GeoToolsDataReader implements DatasetReader {

private @Getter @Setter List<GeoToolsFormat> supportedFormats = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
import lombok.NonNull;
import lombok.extern.slf4j.Slf4j;

@Slf4j
@Slf4j(topic = "com.camptocamp.opendata.producer.geotools")
abstract class GeoToolsFormat {

public abstract String getName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

import lombok.extern.slf4j.Slf4j;

@Slf4j
@Slf4j(topic = "com.camptocamp.opendata.jackson.geojson")
public class GeoRecordToGeoJsonFeatureModule extends SimpleModule {
private static final long serialVersionUID = 1L;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
* </code>
* </pre>
*/
@Slf4j
@Slf4j(topic = "com.camptocamp.opendata.jackson.geojson")
public class JtsGeoJsonModule extends SimpleModule {
private static final long serialVersionUID = 1L;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
import reactor.core.publisher.Flux;
import reactor.core.scheduler.Schedulers;

@Slf4j
@SpringBootApplication
@Slf4j(topic = "com.camptocamp.opendata.indexing.app")
public class IndexingApp {

private @Autowired Producers producers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import lombok.extern.slf4j.Slf4j;
import reactor.core.publisher.Flux;

@Slf4j
@Slf4j(topic = "com.camptocamp.opendata.indexing.sink")
public class Consumers {

public void index(@NonNull Flux<GeodataRecord> records) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,16 @@
import com.camptocamp.opendata.producer.geotools.FeatureToRecord;

import lombok.NonNull;
import lombok.extern.slf4j.Slf4j;

@AutoConfiguration
@Profile("postgis")
@Slf4j(topic = "com.camptocamp.opendata.ogc.features.autoconfigure.geotools")
public class PostgisBackendAutoConfiguration implements WebMvcConfigurer {

@Bean
CollectionRepository postgisDataStoreCollectionRepository(DataStoreProvider dsProvider) {
log.info("Using GeoTools PostGIS CollectionRepository");
return new DataStoreCollectionRepository(dsProvider, new FeatureToRecord());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@
*/
@AutoConfiguration
@Profile("sample-data")
@Slf4j
@Slf4j(topic = "com.camptocamp.opendata.ogc.features.autoconfigure.geotools")
public class SampleDataBackendAutoConfiguration {

@Bean
CollectionRepository sampleDataDataStoreCollectionRepository(SampleData dsProvider) {
log.info("Using geotools sample data CollectionRepository");
return new DataStoreCollectionRepository(dsProvider, new FeatureToRecord());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import org.geotools.data.simple.SimpleFeatureCollection;
import org.geotools.data.simple.SimpleFeatureIterator;
import org.geotools.factory.CommonFactoryFinder;
import org.geotools.filter.text.cql2.CQL;
import org.geotools.filter.text.cql2.CQLException;
import org.geotools.filter.text.ecql.ECQL;
import org.geotools.referencing.CRS;
Expand All @@ -40,7 +39,7 @@
import lombok.extern.slf4j.Slf4j;

@RequiredArgsConstructor
@Slf4j
@Slf4j(topic = "com.camptocamp.opendata.ogc.features.repository")
public class DataStoreCollectionRepository implements CollectionRepository {

private final @NonNull DataStoreProvider dataStoreProvider;
Expand Down
12 changes: 10 additions & 2 deletions src/services/ogc-features/src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
spring:
application:
name: ogc-features
main:
banner-mode: off
jackson.default-property-inclusion: non-empty

springdoc:
Expand All @@ -17,7 +19,13 @@ springdoc:
logging:
level:
root: info
com.zaxxer.hikari.pool.HikariPool: OFF
com.zaxxer.hikari.pool.HikariPool: warn
com.zaxxer.hikari.HikariDataSource: warn
org.geotools.jdbc: warn
com.camptocamp.opendata.ogc.features.autoconfigure: info
com.camptocamp.opendata.ogc.features.repository: info
com.camptocamp.opendata.producer.geotools: info
com.camptocamp.opendata.jackson.geojson: info

---
spring:
Expand All @@ -30,6 +38,6 @@ spring:
hikari:
maximum-pool-size: ${postgres.pool.maxsize:20}
minimum-idle: ${postgres.pool.minsize:0}
max-lifetime: 1000
max-lifetime: 30000 # 30000ms is the minimum allowed


7 changes: 0 additions & 7 deletions src/services/ogc-features/src/test/resources/application.yml

This file was deleted.

0 comments on commit e9f53af

Please sign in to comment.