Skip to content

Commit 97d26e1

Browse files
committed
feat: include logs at GraphSupplier
Signed-off-by: Otavio Santana <otaviopolianasantana@gmail.com>
1 parent 5fc92a8 commit 97d26e1

File tree

1 file changed

+7
-3
lines changed
  • jnosql-tinkerpop/src/main/java/org/eclipse/jnosql/databases/tinkerpop/mapping/configuration

1 file changed

+7
-3
lines changed

jnosql-tinkerpop/src/main/java/org/eclipse/jnosql/databases/tinkerpop/mapping/configuration/GraphSupplier.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,32 @@
2424
import org.eclipse.jnosql.mapping.reflection.Reflections;
2525

2626
import java.util.function.Supplier;
27+
import java.util.logging.Logger;
2728

2829
import static org.eclipse.jnosql.mapping.core.config.MappingConfigurations.GRAPH_PROVIDER;
2930

3031

3132
@ApplicationScoped
3233
class GraphSupplier implements Supplier<Graph> {
3334

35+
public static Logger LOGGER = Logger.getLogger(GraphSupplier.class.getName());
36+
3437
@SuppressWarnings("unchecked")
3538
@Override
3639
@Produces
3740
@ApplicationScoped
3841
public Graph get(){
3942
var settings = MicroProfileSettings.INSTANCE;
40-
41-
GraphConfiguration configuration = settings.get(GRAPH_PROVIDER, Class.class)
43+
LOGGER.fine("Loading the Graph configuration");
44+
var configuration = settings.get(GRAPH_PROVIDER, Class.class)
4245
.filter(GraphConfiguration.class::isAssignableFrom)
4346
.map(c -> (GraphConfiguration) Reflections.newInstance(c)).orElseGet(GraphConfiguration::getConfiguration);
44-
47+
LOGGER.fine("The Graph configuration loaded successfully with: " + configuration.getClass());
4548
return configuration.apply(settings);
4649
}
4750

4851
public void close(@Disposes Graph graph) throws Exception {
52+
LOGGER.fine("Closing the Graph");
4953
graph.close();
5054
}
5155
}

0 commit comments

Comments
 (0)