From 6dc6c29fa4a4ddd3bb72f8415fac5936d719bd44 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Mon, 18 May 2020 02:34:41 +0100 Subject: refactor(3p/nix/libutil): Replace internal logging library with glog --- third_party/nix/src/libutil/compression.cc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'third_party/nix/src/libutil/compression.cc') diff --git a/third_party/nix/src/libutil/compression.cc b/third_party/nix/src/libutil/compression.cc index 39bde37e0fd4..1f284b097054 100644 --- a/third_party/nix/src/libutil/compression.cc +++ b/third_party/nix/src/libutil/compression.cc @@ -7,7 +7,7 @@ #include #include #include "finally.hh" -#include "logging.hh" +#include "glog/logging.h" #include "util.hh" namespace nix { @@ -217,16 +217,18 @@ struct XzCompressionSink : CompressionSink { ret = lzma_stream_encoder_mt(&strm, &mt_options); done = true; #else - printMsg(lvlError, - "warning: parallel XZ compression requested but not supported, " - "falling back to single-threaded compression"); + LOG(ERROR) << "parallel XZ compression requested but not supported, " + << "falling back to single-threaded compression"; #endif } - if (!done) ret = lzma_easy_encoder(&strm, 6, LZMA_CHECK_CRC64); + if (!done) { + ret = lzma_easy_encoder(&strm, 6, LZMA_CHECK_CRC64); + } - if (ret != LZMA_OK) + if (ret != LZMA_OK) { throw CompressionError("unable to initialise lzma encoder"); + } // FIXME: apply the x86 BCJ filter? -- cgit 1.4.1