How to set absolute logdir in spring-boot?
https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-logging.html According to the docs above, I could set the logpath and filename as follows. logging.file=/var/log/mylog.log. BUT: I see the logging to console, but the logfile is never writter (nowhere on the filesystem!). When I change the property as follows: logging.file=var/log/mylog.log. Then I'm getting the log in classpathroot/var/log/mylog.log. Question: why is it working under the classpath root, but not in /var/log?
If you use relative path in the value of logging.file, it will save log in under current directory. As it is mentioned in the section. Writes to the specified log file. Names can be an exact location or relative to the current directory. But if you provide absolute path in the value. Then there is no problem at all. But i think in your case you had put a directory which is not permitted to write file by the user you were trying to run the application. Better to provide a directory which having permission to write file or give the permission to the application user (which will run application) to write file in the given directory.
use logging.path=/var/log/mylog.log as indicated here https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-logging.html section 26.3
Pig UDF Test cases: org.apache.pig.test.MiniGenericCluster cannot resolve
Using POI for excel works in Java
ActiveMQ keeps ESTABLISHED connections
Java ArrayList<ArrayList<String>> clear() on child clears parent
Force read only first sheet in Apache POI
Get info about which groups didn't matched
IBM Watson Conversation API returning parent node always, not inserting into child node
HttpClient vs HtmlUnit
The method getOrDefault(String, String) is undefined for the type Map<String,String>
Voice recognition/dictation for Android [closed]
import(as library) zip file in library
Unable to find message body reader with content type application/json in Jersey Test Framework
C# byteArray to Java
why is java taking long time initializing two dimensional arrays starting with the first dimension having a big size number?
Why does this Query return NULL?
How to compare password with the password which is encrypted and stored in DB, when user enters for login