Selaa lähdekoodia

Prettier log output

default_compile_flags
vector-of-bool 5 vuotta sitten
vanhempi
commit
eeca842437
2 muutettua tiedostoa jossa 5 lisäystä ja 8 poistoa
  1. +4
    -7
      src/dds/build/plan/compile_file.cpp
  2. +1
    -1
      src/dds/dds.main.cpp

+ 4
- 7
src/dds/build/plan/compile_file.cpp Näytä tiedosto

@@ -26,9 +26,9 @@ void compile_file_plan::compile(const build_env& env) const {
const auto obj_path = calc_object_file_path(env);
fs::create_directories(obj_path.parent_path());

spdlog::info("[{}] Compile: {}",
_qualifier,
fs::relative(_source.path, _source.basis_path).string());
auto msg = fmt::format("[{}] Compile: {:40}", _qualifier, fs::relative(_source.path, _source.basis_path).string());
spdlog::info(msg);
auto start_time = std::chrono::steady_clock::now();

auto cmd = generate_compile_command(env);
@@ -37,10 +37,7 @@ void compile_file_plan::compile(const build_env& env) const {
auto end_time = std::chrono::steady_clock::now();
auto dur_ms = std::chrono::duration_cast<std::chrono::milliseconds>(end_time - start_time);

spdlog::info("[{}] Compile: {} - {:n}ms",
_qualifier,
fs::relative(_source.path, _source.basis_path).string(),
dur_ms.count());
spdlog::info("{} - {:>5n}ms", msg, dur_ms.count());

if (!compile_res.okay()) {
spdlog::error("Compilation failed: {}", _source.path.string());

+ 1
- 1
src/dds/dds.main.cpp Näytä tiedosto

@@ -455,7 +455,7 @@ struct cli_deps {
*/

int main(int argc, char** argv) {
spdlog::set_pattern("[%H:%M:%S] [%^%l%$] %v");
spdlog::set_pattern("[%H:%M:%S] [%^%-5l%$] %v");
args::ArgumentParser parser("DDS - The drop-dead-simple library manager");

cli_base cli{parser};

Loading…
Peruuta
Tallenna