fn-log icon indicating copy to clipboard operation
fn-log copied to clipboard

总channel数量超过2会报错

Open speedster opened this issue 2 years ago • 1 comments

配置文件:

 hot_update: true
 - channel: 0  
    priority: debug
    category: 0
    category_extend: 0
    -device: 0
        disable: false
        out_type: file
        priority: debug
        category: 0
        category_extend: 0
        path: "/userdata/mylog/"
        file: "Events-$YEAR-$MON-$DAY"
        rollback: 4
        limit_size: 1000 m #only support M byte
        stuff_up:false

    -device: 1
        disable: false
        out_type: screen
        category: 0
        category_extend: 0
        stuff_up:false
 - channel: 1  
    priority: debug
    category: 0
    category_extend: 0
    -device: 0
        disable: false
        out_type: file
        priority: debug
        category: 0
        category_extend: 0
        path: "/userdata/mylog/"
        file: "Update-$YEAR-$MON-$DAY"
        rollback: 4
        limit_size: 1000 m #only support M byte
        stuff_up:false

    -device: 1
        disable: false
        out_type: screen
        category: 0
        category_extend: 0
        stuff_up:false
 - channel: 2
    priority: debug
    category: 0
    category_extend: 0
    -device: 0
        disable: false
        out_type: file
        priority: debug
        category: 0
        category_extend: 0
        path: "/userdata/mylog/"
        file: "Monitor-$YEAR-$MON-$DAY"
        rollback: 4
        limit_size: 1000 m #only support M byte
        stuff_up:false

    -device: 1
        disable: false
        out_type: screen
        category: 0
        category_extend: 0
        stuff_up:false

报错:

      load has error:<15> in line:[48], line type:1 before:    priority: debug
          catego
      ymal:</app/mw-platform/config/fn-log/logger.yaml> has parse/init error
      init and load default logger error. ret:<15>.
      load auto start default logger error. ret:<15>.

测试平台:ARM 32开发板

speedster avatar Nov 30 '22 09:11 speedster

在记载fnlog.h前 先#define FN_LOG_MAX_CHANNEL_SIZE 5 修改通道数量. 默认是2. 这个方法参考"benchmark_normal.cpp"

也可以在cmake文件中以-D形式统一定义好.

zsummer avatar Apr 10 '23 12:04 zsummer