summaryrefslogtreecommitdiff
path: root/vendor/go.opentelemetry.io/otel/log
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/go.opentelemetry.io/otel/log')
-rw-r--r--vendor/go.opentelemetry.io/otel/log/LICENSE30
-rw-r--r--vendor/go.opentelemetry.io/otel/log/keyvalue.go6
-rw-r--r--vendor/go.opentelemetry.io/otel/log/logger.go2
-rw-r--r--vendor/go.opentelemetry.io/otel/log/record.go8
4 files changed, 42 insertions, 4 deletions
diff --git a/vendor/go.opentelemetry.io/otel/log/LICENSE b/vendor/go.opentelemetry.io/otel/log/LICENSE
index 261eeb9e9..f1aee0f11 100644
--- a/vendor/go.opentelemetry.io/otel/log/LICENSE
+++ b/vendor/go.opentelemetry.io/otel/log/LICENSE
@@ -199,3 +199,33 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
+
+--------------------------------------------------------------------------------
+
+Copyright 2009 The Go Authors.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google LLC nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file
diff --git a/vendor/go.opentelemetry.io/otel/log/keyvalue.go b/vendor/go.opentelemetry.io/otel/log/keyvalue.go
index 87d1a8275..f87cee04d 100644
--- a/vendor/go.opentelemetry.io/otel/log/keyvalue.go
+++ b/vendor/go.opentelemetry.io/otel/log/keyvalue.go
@@ -242,10 +242,10 @@ func (v Value) Kind() Kind {
}
}
-// Empty returns if v does not hold any value.
+// Empty reports whether v does not hold any value.
func (v Value) Empty() bool { return v.Kind() == KindEmpty }
-// Equal returns if v is equal to w.
+// Equal reports whether v is equal to w.
func (v Value) Equal(w Value) bool {
k1 := v.Kind()
k2 := w.Kind()
@@ -326,7 +326,7 @@ type KeyValue struct {
Value Value
}
-// Equal returns if a is equal to b.
+// Equal reports whether a is equal to b.
func (a KeyValue) Equal(b KeyValue) bool {
return a.Key == b.Key && a.Value.Equal(b.Value)
}
diff --git a/vendor/go.opentelemetry.io/otel/log/logger.go b/vendor/go.opentelemetry.io/otel/log/logger.go
index 99a429a71..8441ca884 100644
--- a/vendor/go.opentelemetry.io/otel/log/logger.go
+++ b/vendor/go.opentelemetry.io/otel/log/logger.go
@@ -30,7 +30,7 @@ type Logger interface {
// concurrently.
Emit(ctx context.Context, record Record)
- // Enabled returns whether the Logger emits for the given context and
+ // Enabled reports whether the Logger emits for the given context and
// param.
//
// This is useful for users that want to know if a [Record]
diff --git a/vendor/go.opentelemetry.io/otel/log/record.go b/vendor/go.opentelemetry.io/otel/log/record.go
index 4d2f32d0f..adde7a0dc 100644
--- a/vendor/go.opentelemetry.io/otel/log/record.go
+++ b/vendor/go.opentelemetry.io/otel/log/record.go
@@ -142,3 +142,11 @@ func (r *Record) AddAttributes(attrs ...KeyValue) {
func (r *Record) AttributesLen() int {
return r.nFront + len(r.back)
}
+
+// Clone returns a copy of the record with no shared state.
+// The original record and the clone can both be modified without interfering with each other.
+func (r *Record) Clone() Record {
+ res := *r
+ res.back = slices.Clone(r.back)
+ return res
+}