@@ -53,9 +53,7 @@ pub trait LogProcessor: Send + Sync + Debug {
5353 /// - `instrumentation`: The instrumentation scope associated with the log record.
5454 fn emit ( & self , data : & mut SdkLogRecord , instrumentation : & InstrumentationScope ) ;
5555 /// Force the logs lying in the cache to be exported.
56- fn force_flush_with_timeout ( & self , _timeout : Duration ) -> OTelSdkResult {
57- Ok ( ( ) )
58- }
56+ fn force_flush_with_timeout ( & self , _timeout : Duration ) -> OTelSdkResult ;
5957 /// Force the logs lying in the cache to be exported with default timeout.
6058 fn force_flush ( & self ) -> OTelSdkResult {
6159 self . force_flush_with_timeout ( Duration :: from_secs ( 5 ) )
@@ -109,6 +107,7 @@ pub(crate) mod tests {
109107 use opentelemetry:: logs:: { Logger , LoggerProvider } ;
110108 use opentelemetry:: { InstrumentationScope , Key } ;
111109 use std:: sync:: { Arc , Mutex } ;
110+ use std:: time:: Duration ;
112111
113112 #[ derive( Debug , Clone ) ]
114113 pub ( crate ) struct MockLogExporter {
@@ -158,7 +157,7 @@ pub(crate) mod tests {
158157 . push ( ( record. clone ( ) , instrumentation. clone ( ) ) ) ; //clone as the LogProcessor is storing the data.
159158 }
160159
161- fn force_flush ( & self ) -> OTelSdkResult {
160+ fn force_flush_with_timeout ( & self , _timeout : Duration ) -> OTelSdkResult {
162161 Ok ( ( ) )
163162 }
164163
@@ -188,7 +187,7 @@ pub(crate) mod tests {
188187 . push ( ( record. clone ( ) , instrumentation. clone ( ) ) ) ;
189188 }
190189
191- fn force_flush ( & self ) -> OTelSdkResult {
190+ fn force_flush_with_timeout ( & self , _timeout : Duration ) -> OTelSdkResult {
192191 Ok ( ( ) )
193192 }
194193
0 commit comments