From 88bfc6d4fd8aa2ec2384eeaeae064ea2e28d9c09 Mon Sep 17 00:00:00 2001 From: Dario Ghunney Ware Date: Mon, 30 Dec 2024 12:35:43 +0000 Subject: [PATCH] #2700 updating log messages --- exampleYmlFiles/docker-compose-latest-security.yml | 4 ++-- .../SPDF/config/security/database/DatabaseConfig.java | 3 ++- src/main/resources/settings.yml.template | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/exampleYmlFiles/docker-compose-latest-security.yml b/exampleYmlFiles/docker-compose-latest-security.yml index ae346d78..1d2cd2c8 100644 --- a/exampleYmlFiles/docker-compose-latest-security.yml +++ b/exampleYmlFiles/docker-compose-latest-security.yml @@ -1,7 +1,7 @@ services: stirling-pdf: container_name: Stirling-PDF-Security - image: stirlingtools/stirling-pdf:latest + image: stirlingtools/stirling-pdf:test deploy: resources: limits: @@ -36,7 +36,7 @@ services: SYSTEM_DATASOURCE_HOSTNAME: "db" SYSTEM_DATASOURCE_PORT: "5432" SYSTEM_DATASOURCE_NAME: "stirling_pdf" - SYSTEM_DATASOURCE_ENABLECUSTOMDATABASE: "false" + SYSTEM_DATASOURCE_ENABLECUSTOMDATABASE: "true" SYSTEM_DATASOURCE_USERNAME: "admin" SYSTEM_DATASOURCE_PASSWORD: "stirling" restart: on-failure:5 diff --git a/src/main/java/stirling/software/SPDF/config/security/database/DatabaseConfig.java b/src/main/java/stirling/software/SPDF/config/security/database/DatabaseConfig.java index 659ce1a9..f7efef2a 100644 --- a/src/main/java/stirling/software/SPDF/config/security/database/DatabaseConfig.java +++ b/src/main/java/stirling/software/SPDF/config/security/database/DatabaseConfig.java @@ -46,7 +46,7 @@ public class DatabaseConfig { DataSourceBuilder dataSourceBuilder = DataSourceBuilder.create(); if (!datasource.isEnableCustomDatabase()) { - log.debug("Using default H2 database"); + log.info("Using default H2 database"); dataSourceBuilder.driverClassName(DEFAULT_DRIVER); dataSourceBuilder.url(DATASOURCE_DEFAULT_URL); @@ -55,6 +55,7 @@ public class DatabaseConfig { return dataSourceBuilder.build(); } + log.info("Using custom database"); dataSourceBuilder.driverClassName(getDriverClassName(datasource.getType())); dataSourceBuilder.url( getDataSourceUrl( diff --git a/src/main/resources/settings.yml.template b/src/main/resources/settings.yml.template index 3f97bc06..8942b0b1 100644 --- a/src/main/resources/settings.yml.template +++ b/src/main/resources/settings.yml.template @@ -86,7 +86,7 @@ system: tessdataDir: /usr/share/tessdata # path to the directory containing the Tessdata files. This setting is relevant for Windows systems. For Windows users, this path should be adjusted to point to the appropriate directory where the Tessdata files are stored. enableAnalytics: undefined # set to 'true' to enable analytics, set to 'false' to disable analytics; for enterprise users, this is set to true datasource: - enableCustomDatabase: false # set this property to 'true' if you would like to use the default database configuration + enableCustomDatabase: true # set this property to 'true' if you would like to use the default database configuration type: postgresql # the type of the database to set (e.g. 'h2', 'postgresql') hostName: localhost # the host name to use for the database url. Set to 'localhost' when running the app locally. Set to match the name of the container name of your database container when running the app on a server (Docker configuration) port: 5432 # set the port number of the database. Ensure this matches the port the database is listening to