Skip to content

Commit

Permalink
migrate uses of legacy alias folly::io::getCodec
Browse files Browse the repository at this point in the history
Reviewed By: hanidamlaj

Differential Revision: D68642745

fbshipit-source-id: 68cf1999537f2233dfb6778d22cdc2c371708b04
  • Loading branch information
yfeldblum authored and facebook-github-bot committed Jan 31, 2025
1 parent b699a97 commit ccb3db6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion quic/logging/FileQLogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,8 @@ void FileQLogger::outputLogsToFile(const std::string& path, bool prettyJson) {
: folly::toJson(toDynamic());
if (compress_) {
try {
auto gzipCodec = folly::io::getCodec(folly::io::CodecType::GZIP);
auto gzipCodec =
folly::compression::getCodec(folly::io::CodecType::GZIP);
auto compressed = gzipCodec->compress(qLog);
fileObj << compressed;
} catch (std::invalid_argument& ex) {
Expand Down
4 changes: 2 additions & 2 deletions quic/logging/test/QLoggerTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1547,7 +1547,7 @@ TEST_F(QLoggerTest, CompressedStream) {
auto success = folly::readFile(outputPath.c_str(), compressedData);
ASSERT_TRUE(success);

std::string str = folly::io::getCodec(folly::io::CodecType::GZIP)
std::string str = folly::compression::getCodec(folly::io::CodecType::GZIP)
->uncompress(compressedData);
folly::dynamic parsed = folly::parseJson(str);

Expand Down Expand Up @@ -1591,7 +1591,7 @@ TEST_F(QLoggerTest, CompressedNonStream) {
auto success = folly::readFile(outputPath.c_str(), compressedData);
ASSERT_TRUE(success);

std::string str = folly::io::getCodec(folly::io::CodecType::GZIP)
std::string str = folly::compression::getCodec(folly::io::CodecType::GZIP)
->uncompress(compressedData);
folly::dynamic parsed = folly::parseJson(str);

Expand Down

0 comments on commit ccb3db6

Please sign in to comment.