Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nano_rpc: Error: logging should be initialized before creating a logger #4691

Open
milahu opened this issue Aug 4, 2024 · 0 comments
Open

Comments

@milahu
Copy link

milahu commented Aug 4, 2024

continue #4680 (comment) for better visibility

Error: logging should be initialized before creating a logger
$ ./result/bin/nano_rpc --help
Assertion (global_initialized) failed
nano::logger::logger(std::string)
/build/source/nano/lib/logging.cpp:220
Error: logging should be initialized before creating a logger

 0# 0x00000000005B5357 in ./result/bin/nano_rpc
 1# 0x00000000005AF0F8 in ./result/bin/nano_rpc
 2# 0x000000000055F6D2 in ./result/bin/nano_rpc
 3# 0x000000000049990A in ./result/bin/nano_rpc
 4# __libc_start_main in /nix/store/apab5i73dqa09wx0q27b6fbhd1r18ihl-glibc-2.39-31/lib/libc.so.6
 5# 0x000000000049E475 in ./result/bin/nano_rpc

Aborted (core dumped)

low priority, because nano_rpc is just an rpc client

the problem is that nano::logger::logger is called before nano::logger::initialize

nano/nano_rpc/entry.cpp

namespace
{
nano::logger logger{ "rpc_daemon" };

the fix will be similar to #4680

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant