-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #204 from FederatedAI/dev-2.1.7
Dev 2.1.7
- Loading branch information
Showing
62 changed files
with
1,108 additions
and
268 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -119,6 +119,7 @@ public void stop() { | |
} catch (InterruptedException e) { | ||
e.printStackTrace(); | ||
} | ||
tryNum++; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
...admin/src/main/java/com/webank/ai/fate/serving/admin/controller/DynamicLogController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package com.webank.ai.fate.serving.admin.controller; | ||
|
||
import org.apache.logging.log4j.Level; | ||
import org.apache.logging.log4j.LogManager; | ||
import org.apache.logging.log4j.core.LoggerContext; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import org.springframework.web.bind.annotation.*; | ||
|
||
/** | ||
* @author hcy | ||
*/ | ||
@RequestMapping("/admin") | ||
@RestController | ||
public class DynamicLogController { | ||
private static final Logger logger = LoggerFactory.getLogger(DynamicLogController.class); | ||
|
||
@GetMapping("/alterSysLogLevel/{level}") | ||
public String alterSysLogLevel(@PathVariable String level){ | ||
try { | ||
LoggerContext context = (LoggerContext) LogManager.getContext(false); | ||
context.getLogger("ROOT").setLevel(Level.valueOf(level)); | ||
return "ok"; | ||
} catch (Exception ex) { | ||
logger.error("admin alterSysLogLevel failed : " + ex); | ||
return "failed"; | ||
} | ||
|
||
} | ||
|
||
@GetMapping("/alterPkgLogLevel") | ||
public String alterPkgLogLevel(@RequestParam String level, @RequestParam String pkgName){ | ||
try { | ||
LoggerContext context = (LoggerContext) LogManager.getContext(false); | ||
context.getLogger(pkgName).setLevel(Level.valueOf(level)); | ||
return "ok"; | ||
} catch (Exception ex) { | ||
logger.error("admin alterPkgLogLevel failed : " + ex); | ||
return "failed"; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.