Browse Source

-Update "installAndRun.sh":

-- Check if a gradle installation with the given version already exists, before downloading and installing gradle.
-- Make sure the "unzip" package is installed, before trying unzipping the gradle package.
- Update the logs' fileName.
master
LSmyrnaios 2 months ago
parent
commit
0540820817
  1. 12
      installAndRun.sh
  2. 2
      src/main/resources/application.properties
  3. 4
      src/main/resources/logback-spring.xml

12
installAndRun.sh

@ -12,11 +12,13 @@ gradleVersion="7.2"
if [[ justInstall -eq 0 ]]; then
wget https://services.gradle.org/distributions/gradle-${gradleVersion}-bin.zip
sudo mkdir /opt/gradle
sudo unzip -d /opt/gradle gradle-${gradleVersion}-bin.zip
#ls /opt/gradle/gradle-${gradleVersion} # For debugging installation
if [[ ! -d /opt/gradle/gradle-${gradleVersion} ]]; then
wget https://services.gradle.org/distributions/gradle-${gradleVersion}-bin.zip
echo -e "\nAsking for sudo, in order to install 'gradle'..\n"
sudo mkdir /opt/gradle
sudo apt install -y unzip && sudo unzip -d /opt/gradle gradle-${gradleVersion}-bin.zip
#ls /opt/gradle/gradle-${gradleVersion} # For debugging installation
fi
export PATH=$PATH:/opt/gradle/gradle-${gradleVersion}/bin

2
src/main/resources/application.properties

@ -16,10 +16,10 @@ server.port = 1880
server.servlet.context-path=/api
# LOGGING LEVELS
spring.output.ansi.enabled=always
logging.level.root=WARN
logging.level.org.springframework.web=INFO
logging.level.eu.openaire.urls_controller=DEBUG
spring.output.ansi.enabled=always
## MULTIPART (MultipartProperties)

4
src/main/resources/logback-spring.xml

@ -1,10 +1,10 @@
<configuration debug="false">
<appender name="File" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>logs/urls_controller.log</file>
<file>logs/UrlsController.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>logs/urls_controller.%i.log.zip</fileNamePattern>
<fileNamePattern>logs/UrlsController.%i.log.zip</fileNamePattern>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">

Loading…
Cancel
Save