-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MB-46900: Don't interpret BucketLogger prefix as fmt string
As part of "MB-46216: Check log format strings at compile-time (ep-engine)" (f038ea0), the behaviour of BucketLogger when it has a prefix which contained fmtlib formatting characters changed. Previously this would throw an exception which spdlog would catch, and print a log message along the lines of: "[*** LOG ERROR #1 ***] [2021-06-15 19:06:07] [globalBucketLogger] {argument not found}" However, with the changes in f038ea0 we perform the formatting of the message outselves in bucket_logger.cc, and the thrown exception isn't caught and can result in kv_engine terminating. Fix by changing how we add the BucketLogger prefixes - don't append them to the format string but instead explicilty format everything, then pass the formatted log string down to spdlog. Change-Id: Iae8212cd02e1ff9c28ae12921a10cedb7d3c6b0f Reviewed-on: http://review.couchbase.org/c/kv_engine/+/155932 Reviewed-by: Ben Huddleston <[email protected]> Tested-by: Build Bot <[email protected]>
- Loading branch information
Showing
3 changed files
with
42 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters