File tree Expand file tree Collapse file tree 1 file changed +3
-13
lines changed
opentelemetry-sdk/src/logs Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -352,19 +352,9 @@ impl LogProcessor for BatchLogProcessor {
352352 }
353353
354354 fn shutdown ( & self ) -> LogResult < ( ) > {
355- // test and set is_shutdown flag if it is not set
356- if self
357- . is_shutdown
358- . swap ( true , std:: sync:: atomic:: Ordering :: Relaxed )
359- {
360- otel_warn ! (
361- name: "BatchLogProcessor.Shutdown.ProcessorShutdown" ,
362- message = "BatchLogProcessor has been shutdown. No further logs will be emitted."
363- ) ;
364- return LogResult :: Err ( LogError :: AlreadyShutdown (
365- "BatchLogProcessor is already shutdown" . into ( ) ,
366- ) ) ;
367- }
355+ // Set is_shutdown to true
356+ self . is_shutdown
357+ . store ( true , std:: sync:: atomic:: Ordering :: Relaxed ) ;
368358
369359 let dropped_logs = self . dropped_logs_count . load ( Ordering :: Relaxed ) ;
370360 let max_queue_size = self . max_queue_size ;
You can’t perform that action at this time.
0 commit comments