【问题标题】:Understanding the error message: spdlog::spdlog_ex了解错误消息:spdlog::spdlog_ex
【发布时间】:2020-01-07 18:19:06
【问题描述】:

我知道这个问题非常具体。尽管如此,也许s.o.可以帮忙:

我今天试图编译一个开源代码。 (任何有兴趣的人,that's the one。)下面描述的错误消息出现在oai_hss -j $PREFIX/hss_rel14.json --onlyloadkey 之后 - 已经按照分步安装指南进行了操作。 在我的终端中输入上述命令后,抛出以下错误:

terminate called after throwing an instance of 'spdlog::spdlog_ex'
what(): Failed opening file logs/hss.log for writing: No such file or directory
Aborted (core dumped)

好吧,这听起来很严重(核心转储)。我正在谷歌搜索该错误消息的含义。我遇到了this 其他 github 项目。显然 spdlog 类正在尝试从我运行程序的任何位置启用日志记录。每当它试图添加到注册表的文件(在本例中为 logs/hss.log)已存在于此注册表中时,它都会引发 spdlog_ex 错误。所以,我想,我的问题的解决方案是找到这个注册表并删除logs/hss.log。这有意义吗?

问题:我在哪里可以找到这个注册表?

也许一些背景知识会很有用:我正在尝试在运行带有 4.15.0-66 通用内核的 Ubuntu 18.04.3 LTS 仿生的 VM 中编译开源代码。 我已经在 /tmp 目录中搜索日志文件夹。空无一人。还能在哪里?

【问题讨论】:

    标签: lte openair 5g


    【解决方案1】:

    打开这个文件

    sudo nano /usr/local/etc/oai/hss_rel14.json
    

    你会看到一些配置,你可以在其中找到 logs/hss.log

    实际上你必须将这 4 个值更改为

    logname: "/var/log/hss.log"
    statlogname: "/var/log/hss_stat.log"
    auditlogname: "/var/log/hss_audit.log"
    ossfile: "~/openair-cn/etc/oss.json"
    

    然后使用 sudo touch 创建这些文件

    sudo touch /var/log/hss.log
    sudo touch /var/log/hss_stat.log
    sudo touch /var/log/hss_audit.log
    

    对于 logname、statlogname 和 auditlogname,您可以将其更改为您想要的任何文件,但我喜欢将它们放在 /var/log 文件夹中。 对于 ossfile , oss.json 实际上就在那里。 希望对您有所帮助

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-12-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-02-02
      相关资源
      最近更新 更多