@@ -42,8 +42,9 @@ public class CrashReportForm extends DialogWrapper {
4242 private String logContent ;
4343 private String crashInfo ;
4444 private String currentConfig ;
45+ private final String recentMessages ;
4546
46- public CrashReportForm (Project project , VirtualFile currentFile , String crash_info , String currentConfig , String logs_path ) {
47+ public CrashReportForm (Project project , VirtualFile currentFile , String crash_info , String currentConfig , String logs_path , String recentMessages ) {
4748 super (project );
4849 this .currentFile = currentFile ;
4950 this .logsPath = logs_path ;
@@ -52,6 +53,7 @@ public CrashReportForm(Project project, VirtualFile currentFile, String crash_in
5253 if (currentConfig == null ) {
5354 this .currentConfig = "Config not found" ;
5455 }
56+ this .recentMessages = recentMessages ;
5557 setTitle ("OdooLS Crash Report" );
5658 init (); // required!
5759 }
@@ -107,7 +109,7 @@ public void actionPerformed(ActionEvent e) {
107109 }
108110
109111 private void sendReport (VirtualFile currentFile , String currentFileContent , String logsPath ) {
110- String url = "https://iap-services.odoo.com/api/odools/vscode/2 /crash_report" ;
112+ String url = "https://iap-services.odoo.com/api/odools/vscode/3 /crash_report" ;
111113 String json = buildJson (currentFile , currentFileContent , logsPath );
112114 try (HttpClient client = HttpClient .newHttpClient ()) {
113115 HttpRequest request = HttpRequest .newBuilder ()
@@ -155,7 +157,8 @@ private String buildJson(VirtualFile currentFile, String currentFileContent, Str
155157 "additional_info": "%s",
156158 "version": "%s",
157159 "python_version": "%s",
158- "configuration": "%s"
160+ "configuration": "%s",
161+ "recent_messages": "%s"
159162 }
160163 }
161164 """ .formatted (
@@ -168,7 +171,8 @@ private String buildJson(VirtualFile currentFile, String currentFileContent, Str
168171 escapeForJson (this .tDescr .getText ()),
169172 pluginVersion ,
170173 "See configuration" ,
171- escapeForJson (this .currentConfig )
174+ escapeForJson (this .currentConfig ),
175+ escapeForJson (this .recentMessages )
172176 );
173177 }
174178
0 commit comments