Java 点击rest服务时未在spring引导控制台上获取应用程序日志

Java 点击rest服务时未在spring引导控制台上获取应用程序日志,java,logging,cucumber,spring-rest,citrus-framework,Java,Logging,Cucumber,Spring Rest,Citrus Framework,我把柑橘黄瓜放在春假靴上。在eclipse中运行时,一切正常。因此,通过使用“mvn clean install”命令,我提取了一个jar文件,并在我从浏览器点击rest服务后使用该命令执行jar“java-jar”,然后在spring引导控制台上找不到任何与应用程序相关的日志。这是我在eclipse中运行的spring应用程序 @org.springframework.boot.autoconfigure.SpringBootApplication public class SpringBoo

我把柑橘黄瓜放在春假靴上。在eclipse中运行时,一切正常。因此,通过使用“mvn clean install”命令,我提取了一个jar文件,并在我从浏览器点击rest服务后使用该命令执行jar“java-jar”,然后在spring引导控制台上找不到任何与应用程序相关的日志。这是我在eclipse中运行的spring应用程序

@org.springframework.boot.autoconfigure.SpringBootApplication
public class SpringBootApplication {

public static void main(String[] args) {
    SpringApplication.run(SpringBootApplication.class, args);
}
}

这是控制器类。它使用junit运行cucumber类,并将html报告文件作为字符串内容返回

public class FeatureController {


@RequestMapping(value="/MQEndtoEnd",produces = MediaType.TEXT_HTML_VALUE)
public String executeFeature(@RequestParam(name = "FeatureFileName") String featureFileName) throws 
    Throwable  {
    String content="";
    String path="D:\\citrus\\Report_Directory\\citrus-test- 
           results.html";//inputs/Report_Directory/citrus-test-results.html
     


    **/*running junit inside rest controller*/ 
    Class jtest=TodoFeatureTest.class;
    JUnitCore.runClasses(jtest);**  
 
    try {

         /*reading html content and returning to bowser*/

        content = FileUtils.readFileToString(new File(path), StandardCharsets.UTF_8); 
   
    } catch (IOException e) {
        e.printStackTrace();
    }
            return content;
    }   
  }
控制器类运行这个junit类

import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;

@RunWith(Cucumber.class)
@CucumberOptions(features={"D:/citrus_works/citrus"},//inputs
strict = true,
      
         glue = { "D:/citrus_works/citrus" }, //inputs
        plugin = { "com.consol.citrus.cucumber.CitrusReporter" } )

public class TodoFeatureTest  {
    
}
   
下面是spring应用程序属性文件

    logging.level.org.springframework=DEBUG
logging.level.com.howtodoinjava=DEBUG
 
#output to a temp_folder/file
logging.file=${java.io.tmpdir}/application.log
 
# Logging pattern for the console
logging.pattern.console= %d{yyyy-MM-dd HH:mm:ss} - %msg%n
 
# Logging pattern for file
logging.pattern.file= %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%
enter code here
当我在eclipse中运行spring boot应用程序时,我能够看到与citrus cucumber相关的日志,但当我在命令提示符下执行可执行的java jar文件并从浏览器点击服务时,我无法在命令提示符下看到与citrus cucumber相关的日志。我需要做些什么来解决这个问题。这是eclipse中发布的控制台。可以在eclipse控制台上看到与此相关的日志。命令提示符下缺少这些日志