File tree Expand file tree Collapse file tree 2 files changed +27
-2
lines changed Expand file tree Collapse file tree 2 files changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -131,6 +131,16 @@ impl CrashInfo {
131
131
primary_endpoint : & Option < Endpoint > ,
132
132
secondary_endpoint : & Option < Endpoint > ,
133
133
) -> anyhow:: Result < ( ) > {
134
+ let debug_msg = format ! (
135
+ "DEBUG: async_upload_to_endpoints called with primary: {:?}, secondary: {:?}\n " ,
136
+ primary_endpoint. as_ref( ) . map( |e| e. url. to_string( ) ) ,
137
+ secondary_endpoint. as_ref( ) . map( |e| e. url. to_string( ) )
138
+ ) ;
139
+ let _ = std:: fs:: OpenOptions :: new ( )
140
+ . create ( true )
141
+ . append ( true )
142
+ . open ( "/tmp/crashtracker_debug.log" )
143
+ . and_then ( |mut f| std:: io:: Write :: write_all ( & mut f, debug_msg. as_bytes ( ) ) ) ;
134
144
// If we're debugging to a file, dump the actual crashinfo into a json
135
145
if let Some ( endpoint) = primary_endpoint {
136
146
if Some ( "file" ) == endpoint. url . scheme_str ( ) {
Original file line number Diff line number Diff line change @@ -246,10 +246,25 @@ impl<'de> serde::Deserialize<'de> for CrashtrackerConfiguration {
246
246
247
247
// Apply secondary endpoint derivation logic during deserialization
248
248
let secondary_endpoint = helper. secondary_endpoint . or_else ( || {
249
- helper
249
+ let derived = helper
250
250
. endpoint
251
251
. as_ref ( )
252
- . and_then ( derive_default_secondary_endpoint)
252
+ . and_then ( derive_default_secondary_endpoint) ;
253
+ if let Some ( ref endpoint) = derived {
254
+ let _ = std:: fs:: write (
255
+ "/tmp/crashtracker_debug.log" ,
256
+ format ! (
257
+ "DEBUG: Derived secondary endpoint during deserialization: {}\n " ,
258
+ endpoint. url
259
+ ) ,
260
+ ) ;
261
+ } else {
262
+ let _ = std:: fs:: write (
263
+ "/tmp/crashtracker_debug.log" ,
264
+ "DEBUG: No secondary endpoint derived during deserialization\n " ,
265
+ ) ;
266
+ }
267
+ derived
253
268
} ) ;
254
269
255
270
Ok ( CrashtrackerConfiguration {
You can’t perform that action at this time.
0 commit comments