mirror of
https://github.com/wassname/ray.git
synced 2026-06-28 15:22:56 +08:00
[Java] Change log dir to /tmp/raylogs (#2677)
Currently, log directory in Java is a relative path . This PR changes it to `/tmp/raylogs` (with the same format as Python, e.g., `local_scheduler-2018-51-17_17-8-6-05164.err`). It also cleans up some relative code.
This commit is contained in:
committed by
Robert Nishihara
parent
e56eb354eb
commit
78b6bfb7f9
@@ -22,14 +22,13 @@ public class RayLog {
|
||||
public static Logger rapp;
|
||||
|
||||
/**
|
||||
* it must be called before using Ray loggers,
|
||||
* or the dynamic update does not work.
|
||||
* @param workingDir store the logs under params.working_directory
|
||||
* Initialize loggers
|
||||
* @param logDir directory of the log files.
|
||||
*/
|
||||
public static void init(String workingDir) {
|
||||
public static void init(String logDir) {
|
||||
String loggingPath = System.getProperty("logging.path");
|
||||
if (loggingPath == null) {
|
||||
System.setProperty("logging.path", workingDir + "/logs");
|
||||
System.setProperty("logging.path", logDir);
|
||||
}
|
||||
String loggingFileName = System.getProperty("logging.file.name");
|
||||
if (loggingFileName != null && loggingFileName.contains("*pid_suffix*")) {
|
||||
|
||||
Reference in New Issue
Block a user