Open goodidea-kp opened 1 year ago
Unable to tell from that small code sample.
I would suggest to attach a debugger, set a breakpoint at CombinedLogger::init
and check if it really is only called once.
If it is some other crate might be initializing the log-infrastructure. In that case put a breakpoint at log::set_global_logger
and figure out throw backtraces, which other crate is interfering here.
My code is deployed as Docker Compose for now. Any help on how to attach a debugger on the remote? How to run the Rust app in debug mode? I know how to do it on Java, but not sure I know how to do remote debugging on Rust. I can see the terminal console very well, but the file is empty. Permissions on file structure? Not sure how to debug. Please advise...
My code is deployed as Docker Compose for now. Any help on how to attach a debugger on the remote?
I am sorry, but this is a repository for a logging library, I am not here to offer general support on linux deployment and configuration.
gdb needs to run on the system the executable is running and since you want to attach at launch it would likely need to run inside the container. I strongly advise to test your application outside of docker for debugging.
How to run the Rust app in debug mode?
Compile without --release. If you compile this application as part of a larger build system, that depends.
I am getting the error:
attempted to set a logger after the logging system was already initialized
Logging is not working. How to fix it? Only 1 occurrence in my code, but runs from async function.