File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,9 @@ void DAP::SendJSON(const llvm::json::Value &json) {
103
103
SendJSON (json_str);
104
104
105
105
if (log) {
106
- *log << " <-- " << std::endl
106
+ auto now = std::chrono::duration<double >(
107
+ std::chrono::system_clock::now ().time_since_epoch ());
108
+ *log << llvm::formatv (" {0:f9} <-- " , now.count ()).str () << std::endl
107
109
<< " Content-Length: " << json_str.size () << " \r\n\r\n "
108
110
<< llvm::formatv (" {0:2}" , json).str () << std::endl;
109
111
}
@@ -130,9 +132,12 @@ std::string DAP::ReadJSON() {
130
132
if (!input.read_full (log.get (), length, json_str))
131
133
return json_str;
132
134
133
- if (log)
134
- *log << " --> " << std::endl << " Content-Length: " << length << " \r\n\r\n " ;
135
-
135
+ if (log) {
136
+ auto now = std::chrono::duration<double >(
137
+ std::chrono::system_clock::now ().time_since_epoch ());
138
+ *log << llvm::formatv (" {0:f9} --> " , now.count ()).str () << std::endl
139
+ << " Content-Length: " << length << " \r\n\r\n " ;
140
+ }
136
141
return json_str;
137
142
}
138
143
You can’t perform that action at this time.
0 commit comments