Module: Couchbase

Defined in:
lib/couchbase/utils.rb,
lib/couchbase/scope.rb,
lib/couchbase/bucket.rb,
lib/couchbase/errors.rb,
lib/couchbase/logger.rb,
lib/couchbase/subdoc.rb,
lib/couchbase/cluster.rb,
lib/couchbase/options.rb,
lib/couchbase/version.rb,
lib/couchbase/collection.rb,
lib/couchbase/management.rb,
lib/couchbase/utils/time.rb,
lib/couchbase/diagnostics.rb,
lib/couchbase/view_options.rb,
lib/couchbase/authenticator.rb,
lib/couchbase/configuration.rb,
lib/couchbase/query_options.rb,
lib/couchbase/datastructures.rb,
lib/couchbase/mutation_state.rb,
lib/couchbase/search_options.rb,
lib/couchbase/json_transcoder.rb,
lib/couchbase/analytics_options.rb,
lib/couchbase/binary_collection.rb,
lib/couchbase/collection_options.rb,
lib/couchbase/management/user_manager.rb,
lib/couchbase/binary_collection_options.rb,
lib/couchbase/management/bucket_manager.rb,
lib/couchbase/datastructures/couchbase_map.rb,
lib/couchbase/datastructures/couchbase_set.rb,
lib/couchbase/datastructures/couchbase_list.rb,
lib/couchbase/management/collection_manager.rb,
lib/couchbase/management/view_index_manager.rb,
lib/couchbase/datastructures/couchbase_queue.rb,
lib/couchbase/management/query_index_manager.rb,
lib/couchbase/management/search_index_manager.rb,
lib/couchbase/management/analytics_index_manager.rb,
lib/rails/generators/couchbase/config/config_generator.rb

Overview

Copyright 2020-2021 Couchbase, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
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.

Defined Under Namespace

Modules: Datastructures, Error, Generators, Management, Options, Utils Classes: BinaryCollection, Bucket, CertificateAuthenticator, Cluster, Collection, Configuration, DiagnosticsResult, JsonTranscoder, LookupInSpec, MutateInSpec, MutationState, MutationToken, PasswordAuthenticator, PingResult, Scope

Constant Summary collapse

VERSION =

Version of the library and all bundled dependencies

Examples:

Display version and all dependencies in command line

# ruby -rcouchbase -e 'pp Couchbase::VERSION'
{:sdk=>"3.0.1",
 :backend=>"1.1.0",
 :build_timestamp=>"2020-10-05 11:19:50",
 :revision=>"b59cb40f11ec2dba992eda285eae5cd7238a59c3",
 :platform=>"Linux-4.15.0-66-generic",
 :cpu=>"x86_64",
 :cc=>"GNU 9.3.1",
 :cxx=>"GNU 9.3.1",
 :ruby=>"2.7.0",
 :spdlog=>"1.8.1",
 :asio=>"1.18.0",
 :snappy=>"1.1.8",
 :http_parser=>"2.9.4",
 :openssl_headers=>"OpenSSL 1.1.1c FIPS  28 May 2019",
 :openssl_runtime=>"OpenSSL 1.1.1c FIPS  28 May 2019"}
{}

Class Method Summary collapse

Class Method Details

.log_levelSymbol

Get current log level

Returns:

  • (Symbol)

    current log level



39
40
41
# File 'lib/couchbase/logger.rb', line 39

def self.log_level
  Backend.get_log_level
end

.log_level=(level) ⇒ void

Note:

The level might be also be set with environment variable COUCHBASE_BACKEND_LOG_LEVEL

This method returns an undefined value.

Set log level

Parameters:

  • level (Symbol)

    new log level.

    Allowed levels (in order of decreasing verbosity):

    • :trace

    • :debug

    • :info (default)

    • :warn

    • :error

    • :critical

    • :off



32
33
34
# File 'lib/couchbase/logger.rb', line 32

def self.log_level=(level)
  Backend.set_log_level(level)
end