• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

fluent / fluent-plugin-opensearch / 14873730023

07 May 2025 02:22AM UTC coverage: 91.339% (-0.006%) from 91.345%
14873730023

Pull #156

github

web-flow
Merge 1576e49ae into 4b6ff1a28
Pull Request #156: Fix memory usage

1160 of 1270 relevant lines covered (91.34%)

155.26 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

84.62
/lib/fluent/log-ext.rb
1
# SPDX-License-Identifier: Apache-2.0
2
#
3
# The fluent-plugin-opensearch Contributors require contributions made to
4
# this file be licensed under the Apache-2.0 license or a
5
# compatible open source license.
6
#
7
# Modifications Copyright OpenSearch Contributors. See
8
# GitHub history for details.
9
#
10
# Licensed toUken Inc. under one or more contributor
11
# license agreements. See the NOTICE file distributed with
12
# this work for additional information regarding copyright
13
# ownership. Elasticsearch B.V. licenses this file to you under
14
# the Apache License, Version 2.0 (the "License"); you may
15
# not use this file except in compliance with the License.
16
# You may obtain a copy of the License at
17
#
18
#   http://www.apache.org/licenses/LICENSE-2.0
19
#
20
# Unless required by applicable law or agreed to in writing,
21
# software distributed under the License is distributed on an
22
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
23
# KIND, either express or implied.  See the License for the
24
# specific language governing permissions and limitations
25
# under the License.
26

27
require 'fluent/log'
1✔
28
# For opensearch-ruby v1.0.0 or later which is based on elasticsearch-ruby v7.14 master tree
29
# logger for Elasticsearch::Loggable required the following methods:
30
#
31
# * debug?
32
# * info?
33
# * warn?
34
# * error?
35
# * fatal?
36

37
module Fluent
1✔
38
  class Log
1✔
39
    # OpenSearch::Loggable does not request trace? method.
40
    # def trace?
41
    #   @level <= LEVEL_TRACE
42
    # end
43

44
    def debug?
1✔
45
      @level <= LEVEL_DEBUG
4✔
46
    end
47

48
    def info?
1✔
49
      @level <= LEVEL_INFO
3✔
50
    end
51

52
    def warn?
1✔
53
      @level <= LEVEL_WARN
×
54
    end
55

56
    def error?
1✔
57
      @level <= LEVEL_ERROR
×
58
    end
59

60
    def fatal?
1✔
61
      @level <= LEVEL_FATAL
1✔
62
    end
63
  end
64
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc