无法使用application.properties修改前哨日志路径

问题描述

我使用此配置在csp.sentinel.log.dir修改application.properties

spring:
    cloud:
        sentinel:
            log:
                dir: F:/abc

java代码

package com.example.test_sen;

import com.alibaba.csp.sentinel.Entry;
import com.alibaba.csp.sentinel.SphU;
import com.alibaba.csp.sentinel.slots.block.BlockException;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import com.example.test_sen.wo.FlowQpsDemo;

@SpringBootApplication
public class TestSenApplication {
    public static void main(String[] args) {
        SpringApplication.run(TestSenApplication.class,args);
        FlowQpsDemo.initFlowRules();
        while (true) {
            Entry entry = null;
            try {
                entry = SphU.entry("HelloWorld");
                System.out.println("hello world");
            } catch (BlockException e1) {
                System.out.println("block!");
            } finally {
                if (entry != null) {
                    entry.exit();
                }
            }
        }
    }

}

但是日志路径始终为${user.home}/logs/csp/,哪里出错了?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)