Jump to content

Recommended Posts

Posted

 

 

All this is about

 

FriendsGame(war)

 

 

I am trying to log error to a log file using springboot log4j but it is not doing

my

 

and trying to connect with mysql database

 

 

 

application.properties file

 

server.port=8080

spring.datasource.username=newfire

spring.datasource.password=

spring.datasource.tomcat.max-active=2

spring.jpa.show-sql=true

spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

spring.datasource.url=jdbc:mysql://tomcat.heliohost.org/newfire_student?verifyServerCertificate=false&useSSL=false&requireSSL=false

spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect

 

logging.file.path=/home/newfire/public_html/jay/

logging.level.org.springframework=error

loging.level.io.app=trace

 

 

And please share log

Posted

Krydos can get this for you.

 

As for logging to file not working, tomcat runs as a different user IIRC, so you probably need to grant write permissions to "other" (e.g. 756 or 757) for the folder the log will be saved in.

Posted

 

registrationTask1 ERROR 2021-05-06 01:14:25,167 [o.s.s.s.TaskUtils$LoggingErrorHandler:95] Unexpected error occurred in scheduled task
java.lang.IllegalStateException: couldn't determine local port. Please set spring.boot.admin.client.instance.service-base-url.
        at de.codecentric.boot.admin.client.registration.DefaultApplicationFactory.getLocalServerPort(DefaultApplicationFactory.java:192)
        at de.codecentric.boot.admin.client.registration.DefaultApplicationFactory.getServiceBaseUrl(DefaultApplicationFactory.java:104)
        at de.codecentric.boot.admin.client.registration.ServletApplicationFactory.getServiceUrl(ServletApplicationFactory.java:63)
        at de.codecentric.boot.admin.client.registration.ServletApplicationFactory.getManagementBaseUrl(ServletApplicationFactory.java:76)
        at de.codecentric.boot.admin.client.registration.DefaultApplicationFactory.getHealthUrl(DefaultApplicationFactory.java:154)
        at de.codecentric.boot.admin.client.registration.DefaultApplicationFactory.createApplication(DefaultApplicationFactory.java:80)
        at de.codecentric.boot.admin.client.registration.DefaultApplicationRegistrator.register(DefaultApplicationRegistrator.java:56)
        at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Posted

All this is about

 

FriendsGame(war)

 

 

I am trying to log error to a log file using springboot log4j but it is not doing

my

 

and trying to connect with mysql database

 

 

 

application.properties file

 

server.port=8080

spring.datasource.username=newfire

spring.datasource.password=

spring.datasource.tomcat.max-active=2

spring.jpa.show-sql=true

spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

spring.datasource.url=jdbc:mysql://tommy.heliohost.org/newfire_student?verifyServerCertificate=false&useSSL=false&requireSSL=false

spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect

 

logging.file.path=/home/newfire/public_html/jay/

logging.level.org.springframework=error

loging.level.io.app=trace

 

 

And please share log

Posted

All this is about

 

FriendsGame(war)

 

 

I am trying to log error to a log file using springboot log4j but it is not doing

my

 

and trying to connect with mysql database

 

 

 

application.properties file

 

server.port=8080

spring.datasource.username=newfire

spring.datasource.password=

spring.datasource.tomcat.max-active=2

spring.jpa.show-sql=true

spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

spring.datasource.url=jdbc:mysql://tommy.heliohost.org/newfire_student?verifyServerCertificate=false&useSSL=false&requireSSL=false

spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect

 

logging.file.path=/home/newfire/public_html/jay/

logging.level.org.springframework=error

loging.level.io.app=trace

 

 

And please share log

 

Topics merged.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...