This fixes a bug in PHP/HH's crypt_blowfish implementation that can cause a short...
[hiphop-php.git] / hphp / util / hackc-log.cpp
blob2f337d3a36c3a8d65cbbc65501845614ed3ca43d
1 /*
2 +----------------------------------------------------------------------+
3 | HipHop for PHP |
4 +----------------------------------------------------------------------+
5 | Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) |
6 +----------------------------------------------------------------------+
7 | This source file is subject to version 3.01 of the PHP license, |
8 | that is bundled with this package in the file LICENSE, and is |
9 | available through the world-wide-web at the following url: |
10 | http://www.php.net/license/3_01.txt |
11 | If you did not receive a copy of the PHP license and are unable to |
12 | obtain it through the world-wide-web, please send a note to |
13 | license@php.net so we can mail you a copy immediately. |
14 +----------------------------------------------------------------------+
17 #include "hphp/util/hackc-log.h"
18 #include "hphp/util/struct-log.h"
20 #include <vector>
22 namespace HPHP {
23 namespace HackC {
25 void logOptions(const folly::dynamic& config_json) {
26 // Expect a list of unmerged strings:
27 // [ini_json; set_config1_json; ...; set_configN_json; json_overrides]
28 if (!config_json.isArray()) return;
30 std::vector<folly::StringPiece> unmerged_configs(config_json.size());
31 for (const auto& json : config_json) {
32 if (!json.isString()) continue;
33 unmerged_configs.push_back(json.stringPiece());
35 StructuredLogEntry sle;
36 sle.setVec("config_jsons", unmerged_configs);
37 StructuredLog::log("hrust_hhbc_opts", sle);
40 } // namespace HackC
41 } // namespace HPHP