* Display version and path information. */
| 552 | * Display version and path information. |
| 553 | */ |
| 554 | void Application::DisplayInfoMessage(std::ostream& os, bool skipVersion) |
| 555 | { |
| 556 | /* icinga-app prints its own version information, stack traces need it here. */ |
| 557 | if (!skipVersion) |
| 558 | os << " Application version: " << GetAppVersion() << "\n\n"; |
| 559 | |
| 560 | os << "System information:\n" |
| 561 | << " Platform: " << Utility::GetPlatformName() << "\n" |
| 562 | << " Platform version: " << Utility::GetPlatformVersion() << "\n" |
| 563 | << " Kernel: " << Utility::GetPlatformKernel() << "\n" |
| 564 | << " Kernel version: " << Utility::GetPlatformKernelVersion() << "\n" |
| 565 | << " Architecture: " << Utility::GetPlatformArchitecture() << "\n"; |
| 566 | |
| 567 | Namespace::Ptr systemNS = ScriptGlobal::Get("System"); |
| 568 | |
| 569 | os << "\nBuild information:\n" |
| 570 | << " Compiler: " << systemNS->Get("BuildCompilerName") << " " << systemNS->Get("BuildCompilerVersion") << "\n" |
| 571 | << " Build host: " << systemNS->Get("BuildHostName") << "\n" |
| 572 | << " OpenSSL version: " << GetOpenSSLVersion() << "\n"; |
| 573 | |
| 574 | os << "\nApplication information:\n" |
| 575 | << "\nGeneral paths:\n" |
| 576 | << " Config directory: " << Configuration::ConfigDir << "\n" |
| 577 | << " Data directory: " << Configuration::DataDir << "\n" |
| 578 | << " Log directory: " << Configuration::LogDir << "\n" |
| 579 | << " Cache directory: " << Configuration::CacheDir << "\n" |
| 580 | << " Spool directory: " << Configuration::SpoolDir << "\n" |
| 581 | << " Run directory: " << Configuration::InitRunDir << "\n" |
| 582 | << "\nOld paths (deprecated):\n" |
| 583 | << " Installation root: " << Configuration::PrefixDir << "\n" |
| 584 | << " Sysconf directory: " << Configuration::SysconfDir << "\n" |
| 585 | << " Run directory (base): " << Configuration::RunDir << "\n" |
| 586 | << " Local state directory: " << Configuration::LocalStateDir << "\n" |
| 587 | << "\nInternal paths:\n" |
| 588 | << " Package data directory: " << Configuration::PkgDataDir << "\n" |
| 589 | << " State path: " << Configuration::StatePath << "\n" |
| 590 | << " Modified attributes path: " << Configuration::ModAttrPath << "\n" |
| 591 | << " Objects path: " << Configuration::ObjectsPath << "\n" |
| 592 | << " Vars path: " << Configuration::VarsPath << "\n" |
| 593 | << " PID path: " << Configuration::PidPath << "\n"; |
| 594 | |
| 595 | } |
| 596 | |
| 597 | /** |
| 598 | * Displays a message that tells users what to do when they encounter a bug. |
nothing calls this directly
no test coverage detected