mirror of
https://github.com/electron/electron.git
synced 2026-02-13 00:25:15 -05:00
adding netconstants to log
This commit is contained in:
@@ -34,7 +34,11 @@ NetLog::NetLog(net::URLRequestContext* context)
|
||||
LOG(ERROR) << "Could not open file: " << log_path.value()
|
||||
<< "for net logging";
|
||||
|
||||
fprintf(log_file_.get(), "{\"events\": [\n");
|
||||
std::string json;
|
||||
scoped_ptr<base::Value> constants = net::GetNetConstants();
|
||||
base::JSONWriter::Write(constants.release(), &json);
|
||||
fprintf(log_file_.get(), "{\"constants\": %s, \n", json.c_str());
|
||||
fprintf(log_file_.get(), "\"events\": [\n");
|
||||
|
||||
if (context_.get()) {
|
||||
DCHECK(context_->CalledOnValidThread());
|
||||
|
||||
Reference in New Issue
Block a user