@@ -195,6 +195,13 @@ They get called in the order of registration. Log records are passed to the
195
195
records, enrich them, filter them, and export to destinations by leveraging
196
196
LogRecord Exporters.
197
197
198
+ Similar to [ LoggerProvider] ( #sdkloggerprovider ) , methods on the ` LogProcessor `
199
+ trait also takes a immutable self (` &self ` ) only, forcing the need to use
200
+ interior mutability, if any mutation is required. The exception to this is
201
+ ` set_resource ` , which takes a ` &mut self ` . This is acceptable as ` set_resource `
202
+ is called by the ` SdkLoggerProvider ` during build() method only, and is not
203
+ required after that.
204
+
198
205
Following built-in Log processors are provided in the Log SDK:
199
206
200
207
##### SimpleLogProcessor
@@ -232,8 +239,13 @@ other words, that many logs can be lost if the app crashes in the middle.
232
239
233
240
## LogExporters
234
241
235
- LogExporters are responsible for exporting logs to a destination. Some of them
236
- include:
242
+ LogExporters are responsible for exporting logs to a destination.
243
+ ` SdkLoggerProvider ` does not have a direct knowledge of the ` LogExporter ` , as it
244
+ only deals with ` LogProcessors ` . It is the ` LogProcessor ` s that invokes
245
+ ` LogExporter ` methods. Most methods on ` LogExporter ` trait also only takes
246
+ ` &self ` , following the same reasoning as [ LogProcessors] ( #logrecord-processors )
247
+
248
+ Some of the exporters are:
237
249
238
250
1 . ** InMemoryExporter** - exports to an in-memory list, primarily for
239
251
unit-testing. This is used extensively in the repo itself, and external users
0 commit comments