#include <cstdarg>
#include <cstdint>
#include <cstdlib>
#include <ostream>
#include <new>
Go to the source code of this file.
◆ voyant_log_init_c()
| void voyant_log_init_c |
( |
| ) |
|
Initialize Voyant logging system from C/C++.
This function initializes the Rust logging system for use in C/C++ applications. It sets up logging to stderr with INFO level as default, but respects the RUST_LOG environment variable for custom configuration.
The logging system supports multiple levels:
- TRACE: Very detailed diagnostic information for fine-grained debugging
- DEBUG: Detailed diagnostic information
- INFO: General informational messages (default)
- WARN: Warning messages for potentially harmful situations
- ERROR: Error messages for failures
- Note
- This function should be called only once, typically during application startup. Calling it multiple times will cause the program to panic.
- Environment Variables:
- Set RUST_LOG environment variable to control logging:
- RUST_LOG=trace - Enable trace level logging (most verbose)
- RUST_LOG=debug - Enable debug level logging
- RUST_LOG=info - Enable info level logging (default)
- RUST_LOG=warn - Enable warning level logging only
- RUST_LOG=error - Enable error level logging only
- RUST_LOG=off - Disable all logging