History log of /5.5.2/kv_engine/logger/spdlogger.cc (Results 1 - 25 of 27)
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, v6.0.3, v5.5.4, v5.5.5, v5.5.6, v6.0.1, v5.5.3, v6.0.0, v5.1.3, v5.5.2, v5.5.1, v5.1.2, 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 ...


# 3927b536 09-Mar-2018 Dave Rigby <daver@couchbase.com>

spdlogger: Remove unused headers

This also avoids a Windows linker error when trying to simplify the
usage of phosphor:

spdlogger.cc.obj : error LNK2019: unresolved external

spdlogger: Remove unused headers

This also avoids a Windows linker error when trying to simplify the
usage of phosphor:

spdlogger.cc.obj : error LNK2019: unresolved external symbol "public: __cdecl phosphor::ChunkLock::ChunkLock ..."

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

show more ...


# 92fafe2d 06-Mar-2018 Trond Norbye <trond.norbye@gmail.com>

MB-28492: Allow running verbose mode from testapp tests

Due to the layered architecture of spdlogger where we build
up a chain of sinks where we send the log message, each of
these s

MB-28492: Allow running verbose mode from testapp tests

Due to the layered architecture of spdlogger where we build
up a chain of sinks where we send the log message, each of
these sinks may filter only a subset of the messages.

When running in production we don't want the console logger
to log below the warning level, as ns_server is the consumer
and it can't keep up with the amount of data we would otherwise
log. ns_server's solution to that is to "drop" the log, so
we'd rather just log at a rate it can consume.

Running in unit-test-mode we do however want to be able to
send more output to the console so we need to set the filter
level to trace (note that the filter set by the logger
on top would cause the events to be filtered out unless
verbosity is bumped)

Change-Id: I71e4bfce2fbb258cad9432a0ec90c012c39524bf
Reviewed-on: http://review.couchbase.org/90496
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 ...


# 38697f73 09-Feb-2018 Trond Norbye <trond.norbye@gmail.com>

It is up to the app to make sure they set up the logger

There is no point of running this test the entire lifefime
of memcached. It is up to the user of the library to make sure
that

It is up to the app to make sure they set up the logger

There is no point of running this test the entire lifefime
of memcached. It is up to the user of the library to make sure
that they create a logger before using it.

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

show more ...


# c8fc61e7 11-Feb-2018 Trond Norbye <trond.norbye@gmail.com>

Remove create-lock in the logger

The lock is pretty useless as we don't support dynamic changes
to the logger.

If we want to use a lock for this we would need to improve the

Remove create-lock in the logger

The lock is pretty useless as we don't support dynamic changes
to the logger.

If we want to use a lock for this we would need to improve the
get() method so that it'll tries to aqcuire the lock if
it thinks it needs to create the blackhole logger and
rerun the check with the lock being held to avoid racing with
other threads creating the file logger.

This is just adding complexity to the code, as the "normal"
use of the logger in production is:

Create console logger
do stuff
read configuration
replace the console logger with the file logger
do stuff
shut down the file logger
exit

The blackhole logger is only used by our unit tests.

Change-Id: If11af8685f96939a7064aa9d516340997745a9f6
Reviewed-on: http://review.couchbase.org/89211
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 ...


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

Remove unused part of the old logger API

Change-Id: I111500132370add975c23b6d69a1358816006fb0
Reviewed-on: http://review.couchbase.org/89067
Reviewed-by: Paolo Cocchi <paolo.cocchi@c

Remove unused part of the old logger API

Change-Id: I111500132370add975c23b6d69a1358816006fb0
Reviewed-on: http://review.couchbase.org/89067
Reviewed-by: Paolo Cocchi <paolo.cocchi@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 ...


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

Refactor: Remove unused argument to shutdown

Change-Id: I42034b142e8b1e574db61d18e6368012afb6f090
Reviewed-on: http://review.couchbase.org/89064
Reviewed-by: Paolo Cocchi <paolo.cocc

Refactor: Remove unused argument to shutdown

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

show more ...


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

Don't use a buffered logger for console logger

Change-Id: If97becd30c3c7930aff246afb5fb409c24bc5a24
Reviewed-on: http://review.couchbase.org/89100
Tested-by: Build Bot <build@couchba

Don't use a buffered logger for console logger

Change-Id: If97becd30c3c7930aff246afb5fb409c24bc5a24
Reviewed-on: http://review.couchbase.org/89100
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 ...


# c5430f6d 02-Feb-2018 Eugen-Alexandru Virtan <eugen.virtan@couchbase.com>

MB-25624[2]: Implement custom sink which deduplicates log messages

Plug dedupe_sink into spdlogger and remove redundant code.

Change-Id: I81b0487754a90e57a7135684adc262be54fdb90f

MB-25624[2]: Implement custom sink which deduplicates log messages

Plug dedupe_sink into spdlogger and remove redundant code.

Change-Id: I81b0487754a90e57a7135684adc262be54fdb90f
Reviewed-on: http://review.couchbase.org/86828
Reviewed-by: Dave Rigby <daver@couchbase.com>
Reviewed-by: Tim Bradgate <tim.bradgate@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 ...


# 17ede5cf 29-Jan-2018 Trond Norbye <trond.norbye@gmail.com>

Change the log levels in spdlogger

Previously we had NOTICE mapped to WARNING and WARNING to ERROR.
This makes the logs look a bit "odd", because what's logged
with NOTICE isn't a wa

Change the log levels in spdlogger

Previously we had NOTICE mapped to WARNING and WARNING to ERROR.
This makes the logs look a bit "odd", because what's logged
with NOTICE isn't a warning, and the warnings aren't erros.

Change the mapping so that NOTICE maps to INFO and WARNING
maps to WARNING.

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

show more ...


# 05e5188a 25-Jan-2018 Trond Norbye <trond.norbye@gmail.com>

Cleanup: Set logger pattern for our logger, not globally

Change-Id: Iabb482f3e4a30d3b346338c621e4416130a9930c
Reviewed-on: http://review.couchbase.org/88364
Tested-by: Build Bot <bui

Cleanup: Set logger pattern for our logger, not globally

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

show more ...


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

Make comments in spdlogger.cc match doxygen-style

Change-Id: I94fd3b480c984ac394254406a0f353d0a0a5e2a3
Reviewed-on: http://review.couchbase.org/88363
Tested-by: Build Bot <build@couc

Make comments in spdlogger.cc match doxygen-style

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

show more ...


# 7fa77746 25-Jan-2018 Trond Norbye <trond.norbye@gmail.com>

Cleanup: Remove unused max_files in spdlogger

It is the responsibility of ns_server to clean up the files
which isn't supposed to be collected.

Change-Id: I914aaa654346937ea0c60

Cleanup: Remove unused max_files in spdlogger

It is the responsibility of ns_server to clean up the files
which isn't supposed to be collected.

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

show more ...


# 92d1ac9d 24-Jan-2018 Trond Norbye <trond.norbye@gmail.com>

Skip filtering of log messages in spdlogger wrapper

The memcached core and ep-engine already performs this check
before calling the wrapper method.

Change-Id: I461fa12331f20bb39

Skip filtering of log messages in spdlogger wrapper

The memcached core and ep-engine already performs this check
before calling the wrapper method.

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

show more ...


# 9f7cfa8c 23-Jan-2018 Trond Norbye <trond.norbye@gmail.com>

Refactor: Don't format the log message twice

Previously we used a separate log object to send data to standard
error (which is to be consumed by ns_server). This means that
the under

Refactor: Don't format the log message twice

Previously we used a separate log object to send data to standard
error (which is to be consumed by ns_server). This means that
the underlying methods (formatting the timestamps, adding the
log level string etc) had to be done for both the file logger
and the standard error.

Later on we wan to be able to use the full features by the
spdlogger (and don't go through the servers C API). We
don't want to have to send to both the loggers, so this
is a preparation for that.

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

show more ...


# 458b395a 23-Jan-2018 Trond Norbye <trond.norbye@gmail.com>

Remove (almost) unused DETAIL log level

The detail level was only used to print out when we moved to
closing state (or all state transitions in the state machinery).

It is alway

Remove (almost) unused DETAIL log level

The detail level was only used to print out when we moved to
closing state (or all state transitions in the state machinery).

It is always disabled in production, and if enabled it'll generate
so much log data that it is pretty much useless ;)

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

show more ...


12