@@ -308,9 +308,15 @@ class RGWOp : public DoutPrefixProvider {
308308 }
309309 virtual const char * name () const = 0;
310310 virtual RGWOpType get_type () { return RGW_OP_UNKNOWN; }
311- virtual std::string canonical_name () const { return fmt::format (" REST.{}.{}" , s->info .method , name ()); }
311+ virtual std::string canonical_name () const {
312+ return fmt::format (" REST.{}.{}" ,
313+ s->info .method != nullptr ? s->info .method : " UNKNOWN" ,
314+ name ());
315+ }
312316 // by default we log all bucket operations
313- virtual bool always_do_bucket_logging () const { return s->bucket != nullptr ; }
317+ virtual bool always_do_bucket_logging () const {
318+ return s->bucket != nullptr ;
319+ }
314320
315321 virtual uint32_t op_mask () { return 0 ; }
316322
@@ -2107,7 +2113,7 @@ class RGWListBucketMultiparts : public RGWOp {
21072113 virtual int get_params (optional_yield y) = 0;
21082114 void send_response () override = 0;
21092115 const char * name () const override { return " list_bucket_multiparts" ; }
2110- virtual std::string canonical_name () const override { return fmt::format (" REST.{}.UPLOADS" , s->info .method ); }
2116+ std::string canonical_name () const override { return fmt::format (" REST.{}.UPLOADS" , s->info .method ); }
21112117 RGWOpType get_type () override { return RGW_OP_LIST_BUCKET_MULTIPARTS; }
21122118 uint32_t op_mask () override { return RGW_OP_TYPE_READ; }
21132119};
0 commit comments