File tree Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,9 @@ release.
1515
1616### Logs
1717
18+ - Define how SDK implements ` Logger.Enabled ` .
19+ ([ #4381 ] ( https://github.com/open-telemetry/opentelemetry-specification/pull/4381 ) )
20+
1821### Baggage
1922
2023### Resource
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ linkTitle: No-Op
44
55# Logs API No-Op Implementation
66
7- ** Status** : [ Stable] ( ../document-status.md )
7+ ** Status** : [ Stable] ( ../document-status.md ) , except where otherwise specified
88
99<details >
1010<summary > Table of Contents </summary >
@@ -15,6 +15,7 @@ linkTitle: No-Op
1515 * [ Logger Creation] ( #logger-creation )
1616- [ Logger] ( #logger )
1717 * [ Emit LogRecord] ( #emit-logrecord )
18+ * [ Enabled] ( #enabled )
1819
1920<!-- tocstop -->
2021
@@ -55,3 +56,9 @@ return the same `Logger` instances to all creation requests.
5556
5657The No-Op ` Logger ` MUST allow
5758for [ emitting LogRecords] ( ./api.md#emit-a-logrecord ) .
59+
60+ ### Enabled
61+
62+ ** Status** : [ Development] ( ../document-status.md )
63+
64+ MUST always return ` false ` .
Original file line number Diff line number Diff line change 1616 * [ ForceFlush] ( #forceflush )
1717- [ Logger] ( #logger )
1818 * [ LoggerConfig] ( #loggerconfig )
19+ * [ Enabled] ( #enabled )
1920- [ Additional LogRecord interfaces] ( #additional-logrecord-interfaces )
2021 * [ ReadableLogRecord] ( #readablelogrecord )
2122 * [ ReadWriteLogRecord] ( #readwritelogrecord )
@@ -190,6 +191,18 @@ It consists of the following parameters:
190191 necessary for implementations to ensure that changes to ` disabled ` are
191192 immediately visible to callers of ` Enabled ` .
192193
194+ ### Enabled
195+
196+ ** Status** : [ Development] ( ../document-status.md )
197+
198+ ` Enabled ` MUST return ` false ` when:
199+
200+ - there are no registered [ ` LogRecordProcessors ` ] ( #logrecordprocessor ) ,
201+ - ` Logger ` is disabled ([ ` LoggerConfig.disabled ` ] ( #loggerconfig ) is ` true ` ).
202+
203+ Otherwise, it SHOULD return ` true ` .
204+ It MAY return ` false ` to support additional optimizations and features.
205+
193206## Additional LogRecord interfaces
194207
195208In this document we refer to ` ReadableLogRecord ` and ` ReadWriteLogRecord ` , defined as follows.
You can’t perform that action at this time.
0 commit comments