History log of /6.6.0/kv_engine/logger/logger.h (Results 1 - 25 of 25)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v7.0.2, v6.6.3, v7.0.1, v7.0.0, v6.6.2, v6.5.2, v6.6.1, v6.0.5, v6.6.0, v6.5.1, v6.0.4, v6.5.0
# 3fba93d6 23-Oct-2019 Dave Rigby <daver@couchbase.com>

Don't attempt to log if cb::logger not present

The cb::logger object should always be present in normal operation
(once logger initialiszed early in memcached startup, until just
bef

Don't attempt to log if cb::logger not present

The cb::logger object should always be present in normal operation
(once logger initialiszed early in memcached startup, until just
before memcached terminates), however it _is_ possible in unit tests
or similar that we attempt to log a message when the logger doesn't
exist.

To ensure we don't crash in this situation, check for a non-null
logger object before attempting to dereference it.

Change-Id: I8d418e8b9903a4e2fcfc38fd713d17f522cd1cc6
Reviewed-on: http://review.couchbase.org/116855
Reviewed-by: Trond Norbye <trond.norbye@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@couchbase.com>

show more ...


Revision tags: v6.0.3, v5.5.4, v5.5.5
# 04c1c8ec 20-Mar-2019 Trond Norbye <trond.norbye@gmail.com>

Remove config.h

Change-Id: I79eb8c762971255db9d36a5f6461a8a6d0f29249
Reviewed-on: http://review.couchbase.org/106517
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Dave

Remove config.h

Change-Id: I79eb8c762971255db9d36a5f6461a8a6d0f29249
Reviewed-on: http://review.couchbase.org/106517
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...


Revision tags: v5.5.6, v6.0.1, v5.5.3, v6.0.0, v5.1.3
# 7b06c038 02-Oct-2018 Ben Huddleston <ben.huddleston@couchbase.com>

MB-30041: Migrate logger to nlohmann::json

Migrate settings.cc to nlohmann::json by migrating individual
handlers, which requires interim parsing of cJSON objects
to nlohmann::json o

MB-30041: Migrate logger to nlohmann::json

Migrate settings.cc to nlohmann::json by migrating individual
handlers, which requires interim parsing of cJSON objects
to nlohmann::json objects.

Migrate logger and logger_config to nlohmann::json.

Change-Id: I2fc8c649e4aa5d50fed93a19ca01fa36e74adf0c
Reviewed-on: http://review.couchbase.org/100182
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


Revision tags: v5.5.2
# 66b3046c 29-Aug-2018 Ben Huddleston <ben.huddleston@couchbase.com>

MB-30302: Register/Unregister BucketLoggers

Register BucketLoggers on creation in the spdlog registry
within the memcached_logger library. Unregister them on
destruction.

Le

MB-30302: Register/Unregister BucketLoggers

Register BucketLoggers on creation in the spdlog registry
within the memcached_logger library. Unregister them on
destruction.

Leverages changes made to spdlog/details/registry.h
wherein it now stores weak_ptr's to ensure that a BucketLogger
can be deleted when it is no longer needed.

This will allow us to change verbosity of all loggers at
runtime in a future patch. Loggers that set a custom verbosity
(views & fts) are unregistered on creation of the DcpProducer
object preventing their verbosity from being changed. This is
in keeping with previous behaviour and ensure we don't end up
in a situation where we cannot revert verbosity settings.

Change-Id: I118fed644418b538dcef54e46c123fef0be6ffc7
Reviewed-on: http://review.couchbase.org/100363
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


# 9f29a7f6 20-Sep-2018 Dave Rigby <daver@couchbase.com>

Optimise logger.h header

- Move logger::Config into it's own file (logger_config.h), changing
all users which just need the logger Config to #include
logger_config.h instead of l

Optimise logger.h header

- Move logger::Config into it's own file (logger_config.h), changing
all users which just need the logger Config to #include
logger_config.h instead of logger.h

- Minimise includes of logger.h; removing where no longer needed in
header files and moving instead to necessary .cc files.

Clean build times:

$ ninja clean
$ CCACHE_DISABLE=true time ninja kv_engine/all -j6

Before (6a3ec65a7):
254.75 real 1426.10 user 78.62 sys
user+sys: 1504

After (d8e692c45):
243.33 real 1366.29 user 76.51 sys
user+sys: 1442

Results in 4% speedup in user+sys build (62s reduction).

Change-Id: I81625a830c3bd7fb7bd0a62a98138334fc3887f5
Reviewed-on: http://review.couchbase.org/99954
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


# 4cd6fe64 11-Sep-2018 Christopher Farman <christopher.farman@couchbase.com>

MB-30552: Add test for correct log formatting of Vbid

Added a test to ensure that Vbid logs correctly, along with a fix
to make that actually happen. <spdlog/fmt/ostr.h> is needed to

MB-30552: Add test for correct log formatting of Vbid

Added a test to ensure that Vbid logs correctly, along with a fix
to make that actually happen. <spdlog/fmt/ostr.h> is needed to
output custom types, however having this in vbucket.cc allows the
implicit conversion of Vbid to uint16_t to take precedence and
ignore the formatting. By including it in the appropriate
locations, this issue can be avoided. This also removes the need
to have a separate vbucket.cc file.

Change-Id: I7cff526218c8700f5e86cf95676e4ab67fc8bdbf
Reviewed-on: http://review.couchbase.org/99439
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


# 6fef726c 06-Sep-2018 Trond Norbye <trond.norbye@gmail.com>

Refactor: Get rid of extra indirection in ServerLogIface

There isn't much value in calling a function which returns a struct
with another function pointer in the server log interface ins

Refactor: Get rid of extra indirection in ServerLogIface

There isn't much value in calling a function which returns a struct
with another function pointer in the server log interface instead
of letting the method return the actual pointer directly.

In addition move the small struct over to server_api.h which
contains the rest of the server API.

Change-Id: I11d88d1473782a8bd2cd8216d2de38b9da68f91a
Reviewed-on: http://review.couchbase.org/99324
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...


# fc3fba7b 06-Sep-2018 Trond Norbye <trond.norbye@gmail.com>

Remove the old log levels (currently unused)

Change-Id: I55358a9fc60750e60cf56c8e9321dbbb27d17876
Reviewed-on: http://review.couchbase.org/99320
Tested-by: Build Bot <build@couchbase

Remove the old log levels (currently unused)

Change-Id: I55358a9fc60750e60cf56c8e9321dbbb27d17876
Reviewed-on: http://review.couchbase.org/99320
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...


# 8293751a 06-Sep-2018 Trond Norbye <trond.norbye@gmail.com>

Remove leftover of old logger: EXTENSION_LOGGER_DESCRIPTOR

Change-Id: I698070a26b93f04bbc0774be9c82d5045a063a6a
Reviewed-on: http://review.couchbase.org/99315
Tested-by: Build Bot <b

Remove leftover of old logger: EXTENSION_LOGGER_DESCRIPTOR

Change-Id: I698070a26b93f04bbc0774be9c82d5045a063a6a
Reviewed-on: http://review.couchbase.org/99315
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...


Revision tags: v5.5.1
# dd2befd5 06-Jul-2018 Ben Huddleston <ben.huddleston@couchbase.com>

MB-30302: Spdlog style formatting for EP Engine

Modification of SERVER_LOG_API and EP Engine to allow for spdlog style
formatting in EP Engine. Requires passing a pointer to the spdlog l

MB-30302: Spdlog style formatting for EP Engine

Modification of SERVER_LOG_API and EP Engine to allow for spdlog style
formatting in EP Engine. Requires passing a pointer to the spdlog logger
object to create a new logger to format the log messages and prepend with
the engine name before using the original spdlog logger to print them.

Change-Id: I3711229fba45002d07bf40e2c6cb7f796e91a7bf
Reviewed-on: http://review.couchbase.org/96605
Reviewed-by: Dave Rigby <daver@couchbase.com>
Reviewed-by: Tim Bradgate <tim.bradgate@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


# ea15e773 29-Jun-2018 Dave Rigby <daver@couchbase.com>

Remove unnecessary headers (daemon / cookie)

Remove unncessary headers and #includes; mostly centered around
cookie.h (but spreading out from there...)

Change-Id: Id0e0045b0b015

Remove unnecessary headers (daemon / cookie)

Remove unncessary headers and #includes; mostly centered around
cookie.h (but spreading out from there...)

Change-Id: Id0e0045b0b015fe75bf347ff784ecfea0102ed27
Reviewed-on: http://review.couchbase.org/96335
Reviewed-by: Tim Bradgate <tim.bradgate@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


Revision tags: v5.1.2
# 2012f546 27-Jun-2018 Dave Rigby <daver@couchbase.com>

MB-30276: Initialise logger with correct log level

The verbosity specified in the memcached.json config file is not
correctly passed to the logger - the logger is always initialised with

MB-30276: Initialise logger with correct log level

The verbosity specified in the memcached.json config file is not
correctly passed to the logger - the logger is always initialised with
level "Info".

The problem is related to the order of construction in
memcached_main():

1. The config file is parsed at memcached.cc:2263, at which point we
notify all registered callbacks to the change in verbosity
(including spdlogger).

2. The logger is initialised later at line 2283; where it uses the
default log level (of info).

As such, the log level from the config file is ignored.

Fix by populating logger::Config::log_level from Settings.verbosity;
so if that has previously been changed then it is correctly populated.

As such, the log level from the config file is ignored.

Change-Id: I428e0dd608b1ea5ad012429aaef69b3ff2f72674
Reviewed-on: http://review.couchbase.org/96168
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


Revision tags: v5.1.1
# 7cdbc465 25-Apr-2018 Tim Bradgate <tim.bradgate@couchbase.com>

MB-29377: Change return signature of cb::logger::get()

Change the return signature of getting the logger object
to return a direct pointer to the object. This has a notable
affect on

MB-29377: Change return signature of cb::logger::get()

Change the return signature of getting the logger object
to return a direct pointer to the object. This has a notable
affect on the logger benchmark results, in the case where we are
A) getting the logger or B) logging at a level which is disabled.

Before change:

Run on (8 X 2300 MHz CPU s)
2018-04-25 15:37:36
----------------------------------------------------------------------------------------------
Benchmark Time CPU Iterations
----------------------------------------------------------------------------------------------
LoggerBench_Blackhole/GetLogger/threads:1 13 ns 13 ns 50902427
LoggerBench_Blackhole/GetLogger/threads:16 38 ns 320 ns 2124144
LoggerBench/LogToLoggerWithDisabledLogLevel/threads:1 13 ns 13 ns 50811533
LoggerBench/LogToLoggerWithDisabledLogLevel/threads:16 54 ns 483 ns 1284736
LoggerBench/LogToLoggerWithEnabledLogLevel/threads:1 475 ns 473 ns 1485288
LoggerBench/LogToLoggerWithEnabledLogLevel/threads:16 606 ns 1065 ns 550688

After change:

Run on (8 X 2300 MHz CPU s)
2018-04-25 15:37:36
----------------------------------------------------------------------------------------------
Benchmark Time CPU Iterations
----------------------------------------------------------------------------------------------
LoggerBench_Blackhole/GetLogger/threads:1 2 ns 2 ns 335836112
LoggerBench_Blackhole/GetLogger/threads:16 0 ns 3 ns 220889872
LoggerBench/LogToLoggerWithDisabledLogLevel/threads:1 2 ns 2 ns 334633624
LoggerBench/LogToLoggerWithDisabledLogLevel/threads:16 0 ns 4 ns 156165040
LoggerBench/LogToLoggerWithEnabledLogLevel/threads:1 472 ns 471 ns 1490142
LoggerBench/LogToLoggerWithEnabledLogLevel/threads:16 423 ns 1075 ns 590576

Change-Id: I82ebd5c1776ff0efad6b9316e1ff35a20887892f
Reviewed-on: http://review.couchbase.org/93286
Reviewed-by: Dave Rigby <daver@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


# 7245345d 24-Apr-2018 Tim Bradgate <tim.bradgate@couchbase.com>

MB-29377: Improve spdlog usage within kv_engine

[1]: Add isInitialized method to cb::logger and use this in
auditd.cc instead of cb::logger::get
[2]: Replace all usages of cb::l

MB-29377: Improve spdlog usage within kv_engine

[1]: Add isInitialized method to cb::logger and use this in
auditd.cc instead of cb::logger::get
[2]: Replace all usages of cb::logger::get in daemon with
the LOG_* macros
[3]: Add default log level to the logger config object and
use this to set the log level during initialization

Change-Id: I3728ec786eef7729609f65a36a35267a3b7e2b78
Reviewed-on: http://review.couchbase.org/93201
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


# 7c4c8272 27-Feb-2018 Trond Norbye <trond.norbye@gmail.com>

MB-27986,MB-28225,MB-27882: Remove log dedupe and flush at 200ms

This patch removes the deduplication logic from the logger as
we want to make sure that we dump (and flush) our log "imme

MB-27986,MB-28225,MB-27882: Remove log dedupe and flush at 200ms

This patch removes the deduplication logic from the logger as
we want to make sure that we dump (and flush) our log "immediately"
to the files. All of the log is written in a dedicated thread
which use a buffered FILE stream. We don't want to flush this
stream for _every_ log message (as that is typically 100 bytes
or so) which would cause a significant increse of file IO.

Instead we want the logger to keep writing data to the FILE
pointer, but if no log message is provided within 200ms we'll
cause FILE stream to be flushed to disk. This means that we'll
try to fill up the FILE streams buffer issue fewer actual
filesystem calls, but at the same time we won't keep the data
in those buffers hanging around for a long time.

Change-Id: I1f320dc540d39d9890c8ba84e89b0ce1f203aaa1
Reviewed-on: http://review.couchbase.org/90146
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...


# 0ee65ef1 09-Feb-2018 Trond Norbye <trond.norbye@gmail.com>

Don't require the server API when creating logger

It's only used for setting the log level, and we may do that
later on if we really want to change it after we've created
the logger.

Don't require the server API when creating logger

It's only used for setting the log level, and we may do that
later on if we really want to change it after we've created
the logger. (If verbosity is being used it is automatically
updated anyway).

Change-Id: Ided21e53e016980e04e3acb9d601de8dd282b708
Reviewed-on: http://review.couchbase.org/89169
Reviewed-by: Tim Bradgate <tim.bradgate@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


# 68203ac6 09-Feb-2018 Trond Norbye <trond.norbye@gmail.com>

Don't use an async logger for blackhole logger

There is an issue [1] during shutdown on windows for async loggers
causing a deadlock.

There isn't much of a benefit putting the e

Don't use an async logger for blackhole logger

There is an issue [1] during shutdown on windows for async loggers
causing a deadlock.

There isn't much of a benefit putting the entry into a queue to
be dropped by another thread anyway ;-)

The shutdown method should drop all loggers (and clients using it
should know that after calling the method there is no loggers)

[1] https://github.com/gabime/spdlog/wiki/6.-Asynchronous-logging

Change-Id: I7fd90a037145626fe27a92d4769702b0318806fc
Reviewed-on: http://review.couchbase.org/89162
Reviewed-by: Tim Bradgate <tim.bradgate@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


# f09315e3 08-Feb-2018 Trond Norbye <trond.norbye@gmail.com>

Make flush and shutdown available through the "new" api

Change-Id: Ie5fab68bbbee30f2db74d78e0ead135be118656b
Reviewed-on: http://review.couchbase.org/89065
Reviewed-by: Paolo Cocchi

Make flush and shutdown available through the "new" api

Change-Id: Ie5fab68bbbee30f2db74d78e0ead135be118656b
Reviewed-on: http://review.couchbase.org/89065
Reviewed-by: Paolo Cocchi <paolo.cocchi@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


# 1f7bdc81 09-Feb-2018 Trond Norbye <trond.norbye@gmail.com>

Update the LOG_ macros to not call the logger function when not enabled

The problem with calling:

LOG_DEBUG("Foo {} {} {}", getId(), getBlah(), convert());

Is that all o

Update the LOG_ macros to not call the logger function when not enabled

The problem with calling:

LOG_DEBUG("Foo {} {} {}", getId(), getBlah(), convert());

Is that all of the methods provided on the LOG_DEBUG line would have
to be called even if the logger would drop the log message.

Tweak the log macros so that we check if the level is enabled
_before_ trying to call the method.

Change-Id: I7a67e54ff3189bfad4d0ea8ee25a7b0dd06bf64c
Reviewed-on: http://review.couchbase.org/89171
Reviewed-by: Tim Bradgate <tim.bradgate@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


# 4dd9b0f4 07-Feb-2018 Trond Norbye <trond.norbye@gmail.com>

Use logger directly in the core

Changed the LOG_ macros used in the core and call
them directly instead of going through the old
logger interface using the printf-style of formatting

Use logger directly in the core

Changed the LOG_ macros used in the core and call
them directly instead of going through the old
logger interface using the printf-style of formatting

Change-Id: I7927bfdd98a843a605fd418ab343f166c25c7b74
Reviewed-on: http://review.couchbase.org/88814
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...


# 7d79b83c 02-Feb-2018 Trond Norbye <trond.norbye@gmail.com>

Use spdlogger for everything

Remove the old stderr and stdout loggers and use the spdlogger
everywhere (and remove the ability to install custom loggers).

Change-Id: Ibd5a5d6775

Use spdlogger for everything

Remove the old stderr and stdout loggers and use the spdlogger
everywhere (and remove the ability to install custom loggers).

Change-Id: Ibd5a5d6775970e33664341f2476dd2dee709abff
Reviewed-on: http://review.couchbase.org/88781
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


# 2f25a169 29-Jan-2018 Trond Norbye <trond.norbye@gmail.com>

Replace blackhole logger with spdlogs null sink

Add a new property "console" to the logger config
which may be set to false (it is enabled by default)
If console is set to false we'l

Replace blackhole logger with spdlogs null sink

Add a new property "console" to the logger config
which may be set to false (it is enabled by default)
If console is set to false we'll use null sink instead
of stderr.

As an extra bonus we'll use the colored sinks when
the unit_test option is set to true.

Change-Id: I690b7022e2cef04b98fd8ebc4ddd39d9913a0d42
Reviewed-on: http://review.couchbase.org/88493
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


# 9ff8c9f9 29-Jan-2018 Trond Norbye <trond.norbye@gmail.com>

Refactor: Don't use the on_log_level from spdlogger

Now that we can fetch the logger object we may set it
directly on the underlying object rather than using
the callback method (The

Refactor: Don't use the on_log_level from spdlogger

Now that we can fetch the logger object we may set it
directly on the underlying object rather than using
the callback method (The callback is still fired
as ep-engine tries to cache the current verbosity
setting)

Change-Id: I8d20800246d432dd95c29a4342dea5357e514188
Reviewed-on: http://review.couchbase.org/88491
Reviewed-by: Tim Bradgate <tim.bradgate@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


# 9d5eebd4 25-Jan-2018 Trond Norbye <trond.norbye@gmail.com>

Refactor: Add a method to fetch the logger

A number of cmake targets had to be updated to reference
the memcached_logger library to have the correct include
path being propagated.

Refactor: Add a method to fetch the logger

A number of cmake targets had to be updated to reference
the memcached_logger library to have the correct include
path being propagated.

Change-Id: I36e905b57f86e714ec0b05c36497162b3b5804aa
Reviewed-on: http://review.couchbase.org/88365
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


# 14052dea 19-Jan-2018 Trond Norbye <trond.norbye@gmail.com>

Refactor: move the spdlogger to memcached_logger

Instead of doing dynamic loading of the logger it is linked into
the binary.

Change-Id: I1577397cc29ecd4f73a50836391a985bac94fe7

Refactor: move the spdlogger to memcached_logger

Instead of doing dynamic loading of the logger it is linked into
the binary.

Change-Id: I1577397cc29ecd4f73a50836391a985bac94fe7f
Reviewed-on: http://review.couchbase.org/88092
Reviewed-by: Dave Rigby <daver@couchbase.com>
Reviewed-by: Tim Bradgate <tim.bradgate@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...