简体   繁体   中英

Understanding the error message: spdlog::spdlog_ex

I am aware this question is very specific. Nontheless, maybe so can help:

I was trying to compile an open-source code today. (anyone, who's interested, that's the one .) The error message described below occurs after oai_hss -j $PREFIX/hss_rel14.json --onlyloadkey - having followed the step-by-step installation guide to this point. After typing the aforementioned command in my terminal, the following error is thrown:

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)

Allright, this sounds pretty severy (core dumped). I was searching google for a meaning of that error message. I came across this other github project. Apparently the spdlog class is trying to enable logging from wherever I run my program. And it throws an spdlog_ex error whenever the file it is trying to add to the registry (in this case logs/hss.log) already exists within this registry. So, I guess, the solution to my problem would be to find this registry and delete logs/hss.log. Does this make sense?

Question: Where the heck do I find this registry?

Maybe some background knowledge would be useful: I am trying to compile the open-source code within a VM that is running Ubuntu 18.04.3 LTS bionic with a 4.15.0-66-generic kernel. I was searching the /tmp directory for a log folder already. There is none. Where else could it be?

open this file

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

you will see some config where you can find logs/hss.log

actually you have to change these 4 value to

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

then use sudo touch to create these files

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

for logname, statlogname, and auditlogname you can change it to whatever file you want but i like to put them together in /var/log folder. for ossfile, the oss.json is actually in there. hope this help

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM