|
| 1 | +# frozen_string_literal: true |
| 2 | + |
| 3 | +# Copyright The OpenTelemetry Authors |
| 4 | +# |
| 5 | +# SPDX-License-Identifier: Apache-2.0 |
| 6 | + |
| 7 | +module OpenTelemetry |
| 8 | + module Logs |
| 9 | + # No-op implementation of logger. |
| 10 | + class Logger |
| 11 | + # rubocop:disable Style/EmptyMethod |
| 12 | + |
| 13 | + # Emit a {LogRecord} to the processing pipeline. |
| 14 | + # |
| 15 | + # @param timestamp [optional Float, Time] Time in nanoseconds since Unix |
| 16 | + # epoch when the event occurred measured by the origin clock, i.e. the |
| 17 | + # time at the source. |
| 18 | + # @param observed_timestamp [optional Float, Time] Time in nanoseconds |
| 19 | + # since Unix epoch when the event was observed by the collection system. |
| 20 | + # Intended default: Process.clock_gettime(Process::CLOCK_REALTIME) |
| 21 | + # @param context [optional Context] The Context to associate with the |
| 22 | + # LogRecord. Intended default: OpenTelemetry::Context.current |
| 23 | + # @param severity_number [optional Integer] Numerical value of the |
| 24 | + # severity. Smaller numerical values correspond to less severe events |
| 25 | + # (such as debug events), larger numerical values correspond to more |
| 26 | + # severe events (such as errors and critical events). |
| 27 | + # @param severity_text [optional String] Original string representation of |
| 28 | + # the severity as it is known at the source. Also known as log level. |
| 29 | + # @param body [optional String, Numeric, Boolean, Array<String, Numeric, |
| 30 | + # Boolean>, Hash{String => String, Numeric, Boolean, Array<String, |
| 31 | + # Numeric, Boolean>}] A value containing the body of the log record. |
| 32 | + # @param attributes [optional Hash{String => String, Numeric, Boolean, |
| 33 | + # Array<String, Numeric, Boolean>}] Additional information about the |
| 34 | + # event. |
| 35 | + # |
| 36 | + # @api public |
| 37 | + def emit( |
| 38 | + timestamp: nil, |
| 39 | + observed_timestamp: nil, |
| 40 | + context: nil, |
| 41 | + severity_number: nil, |
| 42 | + severity_text: nil, |
| 43 | + body: nil, |
| 44 | + attributes: nil |
| 45 | + ) |
| 46 | + end |
| 47 | + # rubocop:enable Style/EmptyMethod |
| 48 | + end |
| 49 | + end |
| 50 | +end |
0 commit comments