refactor(3p/nix/libutil): Replace internal logging library with glog
This commit is contained in:
parent
c584480cd4
commit
6dc6c29fa4
10 changed files with 76 additions and 44 deletions
14
third_party/nix/src/libutil/compression.cc
vendored
14
third_party/nix/src/libutil/compression.cc
vendored
|
|
@ -7,7 +7,7 @@
|
|||
#include <cstring>
|
||||
#include <iostream>
|
||||
#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?
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue