File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ impl Default for OptionalParameters {
170170 hook : None ,
171171 log_init : None ,
172172 #[ cfg( feature = "log" ) ]
173- event_logging : true ,
173+ event_logging : false ,
174174 tos : TypeOverrides :: new ( ) ,
175175 nos : NameOverrides :: new ( ) ,
176176 }
@@ -329,7 +329,7 @@ impl AppsyncLambdaMain {
329329 #[ cfg( feature = "log" ) ]
330330 if self . options . event_logging {
331331 log_lines. extend ( quote ! {
332- :: lambda_appsync:: log:: info !( "event={event:?}" ) ;
332+ :: lambda_appsync:: log:: debug !( "event={event:?}" ) ;
333333 } ) ;
334334 }
335335 #[ cfg( feature = "log" ) ]
@@ -450,8 +450,7 @@ impl AppsyncLambdaMain {
450450 #[ cfg( feature = "log" ) ]
451451 if self . options . event_logging {
452452 log_lines. extend ( quote ! {
453- :: lambda_appsync:: log:: debug!( "{event:?}" ) ;
454- :: lambda_appsync:: log:: info!( "{}" , :: lambda_appsync:: serde_json:: json!( event. payload) ) ;
453+ :: lambda_appsync:: log:: debug!( "{}" , :: lambda_appsync:: serde_json:: json!( event. payload) ) ;
455454 } ) ;
456455 }
457456
Original file line number Diff line number Diff line change @@ -29,8 +29,9 @@ use proc_macro::TokenStream;
2929///
3030/// - `batch = bool`: Enable/disable batch request handling (default: true)
3131/// - `hook = fn_name`: Add a custom hook function for request validation/auth
32- /// - (feature: `log`) `log_init = fn_name`: Use a custom log initialization function instead of the default one
33- /// - (feature: `log`) `event_logging = bool`: If true, the macro will generate code to dump the entire event in the logs (default: `true`)
32+ /// - `log_init = fn_name`: Use a custom log initialization function instead of the default one
33+ /// - (feature: `log`) `event_logging = bool`: If true, the macro will generate code to dump the
34+ /// lambda payload JSON as well as parsed `AppsyncEvent<Operation>`s in the logs at debug level (default: `false`)
3435/// - `exclude_lambda_handler = bool`: Skip generation of Lambda handler code
3536/// - `only_lambda_handler = bool`: Only generate Lambda handler code
3637/// - `exclude_appsync_types = bool`: Skip generation of GraphQL type definitions
Original file line number Diff line number Diff line change 11mod no_run {
2- // Test with event_logging disabled
3- lambda_appsync:: appsync_lambda_main!( "../../../../schema.graphql" , event_logging = false ) ;
2+ // Test with event_logging enabled
3+ lambda_appsync:: appsync_lambda_main!( "../../../../schema.graphql" , event_logging = true ) ;
44}
55
66fn main ( ) { }
You can’t perform that action at this time.
0 commit comments