mirror of
https://gitlab.com/veilid/veilid.git
synced 2025-10-11 18:10:44 -04:00
more startup logs
This commit is contained in:
parent
856145111f
commit
6a79e13024
3 changed files with 16 additions and 4 deletions
|
@ -245,6 +245,11 @@ fn main() {
|
|||
// Gather build-time information, such as the features that were enabled when veilid-core was built.
|
||||
bosion::gather();
|
||||
|
||||
println!(
|
||||
"cargo:rustc-env=TARGET={}",
|
||||
std::env::var("TARGET").unwrap()
|
||||
);
|
||||
|
||||
if is_input_file_outdated("./proto/veilid.capnp", "./proto/veilid_capnp.rs").unwrap() {
|
||||
println!("cargo:warning=rebuilding proto/veilid_capnp.rs because it has changed from the last generation of proto/veilid.capnp");
|
||||
do_capnp_build();
|
||||
|
|
|
@ -60,8 +60,15 @@ impl VeilidCoreContext {
|
|||
let registry = VeilidComponentRegistry::new(config);
|
||||
|
||||
veilid_log!(registry info "Veilid API starting up");
|
||||
veilid_log!(registry info "Version: {}", veilid_version_string());
|
||||
veilid_log!(registry info "Features: {:?}", veilid_features());
|
||||
if let Some(target) = option_env!("TARGET") {
|
||||
veilid_log!(registry info "Build Target: {}", target);
|
||||
}
|
||||
veilid_log!(registry info "Program Name: {}", program_name);
|
||||
if !namespace.is_empty() {
|
||||
veilid_log!(registry info "Namespace: {}", namespace);
|
||||
}
|
||||
veilid_log!(registry info "Features: {:?}", veilid_features());
|
||||
veilid_log!(registry info "Version: {}", veilid_version_string());
|
||||
#[cfg(feature = "footgun")]
|
||||
{
|
||||
veilid_log!(registry warn
|
||||
|
|
|
@ -110,13 +110,13 @@ pub fn veilid_version() -> (u32, u32, u32) {
|
|||
)
|
||||
}
|
||||
|
||||
#[cfg(not(docsrs))]
|
||||
#[cfg(all(not(docsrs), not(doc)))]
|
||||
include!(env!("BOSION_PATH"));
|
||||
|
||||
/// Return the features that were enabled when veilid-core was built.
|
||||
#[must_use]
|
||||
pub fn veilid_features() -> Vec<String> {
|
||||
if cfg!(docsrs) {
|
||||
if cfg!(any(docsrs, doc)) {
|
||||
vec!["default".to_string()]
|
||||
} else {
|
||||
let features = Bosion::CRATE_FEATURES.to_vec();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue