Skip to content

CDRIVER-3775 mongoc_structured_log #1795

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
144 commits merged into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
144 commits
Select commit Hold shift + click to select a range
593089e
WIP: first stab at structured logging
alcaeus Sep 9, 2020
dfee17a
Make context generation lazy to save on resources
alcaeus Sep 11, 2020
826707f
Remove syslog and log to stderr
alcaeus Sep 11, 2020
6896714
Don't clear context_data
alcaeus Sep 11, 2020
1518a7a
Update signatures
alcaeus Sep 15, 2020
a945695
Explicitly track whether context was already built
alcaeus Sep 15, 2020
370b757
Fix coding style
alcaeus Sep 15, 2020
79e52cb
Extract command logging and add structs
alcaeus Sep 17, 2020
de7b41e
Refactor signatures and log all command results
alcaeus Sep 17, 2020
411502a
Keep default logger private
alcaeus Sep 18, 2020
c5b85e6
Rename context to message
alcaeus Sep 18, 2020
06f50fe
Add tests for structured logging
alcaeus Sep 18, 2020
de6370a
Run clang-format
alcaeus Sep 18, 2020
405c4f6
Update copyright years
alcaeus Sep 18, 2020
cb88c6d
Add rudimentary documentation for new public API
alcaeus Sep 18, 2020
e23f5ae
Fix wrong log message for command failed log entry
alcaeus Sep 22, 2020
b463f82
Add spec compliant default logger
alcaeus Sep 22, 2020
2e49e0d
Run clang-format
alcaeus Sep 22, 2020
78f1970
Log client creation
alcaeus Sep 22, 2020
4b580f0
Fix suggestions from code review
alcaeus Sep 24, 2020
5aa50e0
Remove unused variable
alcaeus Sep 24, 2020
810d3fd
Remove union in favour of void *
alcaeus Sep 25, 2020
a8be342
Use lowercase test names
alcaeus Sep 25, 2020
2e73cb4
Free allocated memory in tests
alcaeus Sep 25, 2020
c264c7e
Fix wrong location for imports
alcaeus Sep 25, 2020
eae3b51
Attach OP_MSG document sequences when logging commands
alcaeus Sep 25, 2020
42d50c0
Remove mixed declaration and code
alcaeus Sep 25, 2020
794d51b
Fix single-line comments
alcaeus Sep 28, 2020
bfc69a1
Fix more single line comments
alcaeus Sep 30, 2020
4e846ef
Update logged fields to latest spec version
alcaeus Oct 8, 2020
ca10a2a
Use maximum document length setting when logging documents
alcaeus Oct 13, 2020
33b8ab0
Fix wrong comment style
alcaeus Oct 13, 2020
fbf270f
clang-format-all
Nov 6, 2024
30589f4
CDRIVER-4044 consistent copyright dates for new files
Nov 6, 2024
df6247f
fix build without altering functionality
Nov 6, 2024
7a4d81f
mongoc_cursor_monitor memory leak fix
Nov 6, 2024
69ddf0d
mongoc_structured_log using a macro-generated table of function calls
Nov 9, 2024
92c7596
structured logging support for sized non-terminated strings
Nov 11, 2024
c1396e1
sync command-logging-and-monitoring tests
Nov 11, 2024
4edaa2b
note about CLAM migration
Nov 11, 2024
ce6fc87
Try to run all the CLAM unified tests
Nov 11, 2024
afc20f0
per-component level settings, eager one-time log init
Nov 12, 2024
9f9df98
Use _bsonDSL_mapMacro in mongoc_structured_log
Nov 12, 2024
c7b5248
bring naming into agreement with logging spec
Nov 12, 2024
5fad751
public log level getter, refinements to enum type conversions
Nov 12, 2024
7cf023a
use 'item' instead of 'token', additional comments
Nov 12, 2024
87811ae
public conversions between log level/component and string
Nov 12, 2024
4f54845
nitpick, one item can result in any number of stages
Nov 12, 2024
f57e557
strict parsing for max document length env var
Nov 12, 2024
ca456b1
work in progress, test runner support for log messages
Nov 12, 2024
0dbcafe
clear global structured log handler when any client is destroyed
Nov 12, 2024
b189cb5
first pass at createEntities unified test op
Nov 12, 2024
7ddda2d
remove misleading initializers
Nov 12, 2024
0e18fc0
Implement test_check_expected_log_messages_for_client
Nov 12, 2024
0b0ea30
spec says command logging is at debug level, not info
Nov 12, 2024
271233d
Test comparison wants bson_match, not exact equality
Nov 13, 2024
a883c3f
recursive log suppression internal to test-libmongoc
Nov 13, 2024
2a1f9a4
we must omit all-zero serviceId from logs
Nov 13, 2024
d54dd31
stub implementation for waitForEvent with CMAP ignored
Nov 13, 2024
690f10d
centralize the concept of all-zero oid in common-oid-private
Nov 13, 2024
506bf05
Implement $$matchAsDocument and $$matchAsRoot in bson_match
Nov 13, 2024
76649aa
add driver-connection-id CLAM test to skips for lack of CMAP
Nov 13, 2024
68ac6d0
Structured log support for redacted replies and failures
Nov 14, 2024
ad7a333
trivial improvements to test-mongoc-structured-log
Nov 14, 2024
fe299f5
centralize structured logging about durations
Nov 14, 2024
1b99bbe
mode for struct log bson_as_json should be relaxed
Nov 14, 2024
b597b81
suppress test runner capture of structured logs in cleanup and failpo…
Nov 14, 2024
27c336f
Additional redaction support, doc comments for log macros
Nov 14, 2024
d7f570e
waitForEvent can poll, no need to get fancy
Nov 15, 2024
46b2ca7
bson-dsl oid() values
Nov 15, 2024
7852581
unified tests: serverDescriptionChangedEvent, and refactor event seri…
Nov 15, 2024
b466d3b
unified test runner debug output for events and structured logs
Nov 16, 2024
ab418aa
Remove unnecessary cast advice in sdam-monitoring example
Nov 18, 2024
aad715b
explicitly initiate a single-threaded topology scan in waitForEvent b…
Nov 18, 2024
4add637
event observe/store arrays must copy their strings
Nov 18, 2024
c7b6be7
Portability fix for structured_log atomic early-out
Nov 18, 2024
5e607a5
log level aliases, and tests for component/level names
Nov 18, 2024
d585c01
support MONGODB_LOG_PATH=stdout
Nov 18, 2024
f1574d3
MSVC compatibility, move eval to outer macro
Nov 18, 2024
6cd4fd1
Document the public structured logging API
Nov 18, 2024
e11ad3c
skip MONGOC_NO_SERVER_CONNECTION_ID in structured log serialization
Nov 18, 2024
abc8103
Add a simple structured-logging example
Nov 18, 2024
5dc2469
Make structured logging thread-safe
Nov 19, 2024
b264a02
typo
Nov 19, 2024
925f5bf
utf8 was supposed to be char not void
Nov 19, 2024
0364ea0
CDRIVER-4535 Updates to logging spec
Nov 19, 2024
7ee09f1
Environment variable problems should be warnings, not errors
Nov 19, 2024
d161667
allow using and configuring structured logging prior to mongoc_init
Nov 19, 2024
d346f78
typo
Nov 20, 2024
1f2a035
structured log header no longer needed in mongoc-init
Nov 20, 2024
c69de08
doc a few more safe functions for use inside mongoc_structured_log_fu…
Nov 20, 2024
ef42f4f
table build mutex should cover the entire instigating setter
Nov 20, 2024
ffff0ca
comment only, additional text about handler api restrictions
Nov 20, 2024
bb71ad2
unified tests: avoid duplicating the table of supported events
Nov 20, 2024
ef38227
In waitForEvent, provoke lazy opening of topology descriptions
Nov 25, 2024
7110257
factor out bson_error_t serialization into a structured log "error()"…
Nov 26, 2024
98471c5
typos, null/nul
Nov 27, 2024
1957ebb
Let's start a trend of making bson serialization a shared internal API
Nov 27, 2024
686fb1c
Don't ASSERT in the event a log message is truncated to the max BSON …
Nov 27, 2024
d647e48
refactor shared private serialization
Nov 27, 2024
585cdf1
redesign structured log options and concurrency to support per-client…
Dec 4, 2024
872cce8
structured_log overview: document string values for level, component
Dec 4, 2024
7ff7ce3
Update src/libmongoc/tests/bsonutil/bson-match.c
Dec 4, 2024
310ad35
Update src/libmongoc/tests/bsonutil/bson-match.c
Dec 4, 2024
1b51684
Merge branch 'master' into CDRIVER-3775
Dec 4, 2024
ef4b7ea
clang-format
Dec 4, 2024
5a65c5f
clarify, non-pooled clients
Dec 4, 2024
b2ad83a
revert structured logging from _mongoc_client_monitor_op_killcursors
Dec 4, 2024
8610a81
use BSON_OPTIONAL_PARAM
Dec 5, 2024
e216969
Comment fix, incorrect param names
Dec 5, 2024
1a890b1
unified test runner: avoid replacing specific error with unspecific e…
Dec 5, 2024
f79a216
unified tests: expected log levels may be aliases rather than canonic…
Dec 5, 2024
61808b3
Publish mongoc_structured_log_entry_get_message_string
Dec 6, 2024
d646e61
structured_log doc: clean up redundant toc entries
Dec 6, 2024
13b0480
doc: link to log level type
Dec 6, 2024
9281586
clang-format
Dec 9, 2024
a233d72
Update src/libmongoc/doc/unstructured_log.rst
Dec 9, 2024
33027be
Update src/libmongoc/src/mongoc/mongoc-structured-log.c
Dec 9, 2024
191dd4f
Update src/libmongoc/src/mongoc/mongoc-structured-log.c
Dec 9, 2024
cb53cbb
Update src/libmongoc/src/mongoc/mongoc-structured-log.c
Dec 9, 2024
fa90d6a
Update src/libmongoc/src/mongoc/mongoc-structured-log-private.h
Dec 9, 2024
bdd29d4
Confirmed that logs can include both millis and micros for duration
Dec 10, 2024
c484700
remove incorrect todo comment
Dec 10, 2024
da9a4a5
just remove this todo also
Dec 10, 2024
7f0f43c
Update src/libmongoc/src/mongoc/mongoc-structured-log.c
Dec 16, 2024
42a247b
Update src/libmongoc/src/mongoc/mongoc-structured-log.c
Dec 16, 2024
e990586
example-structured-log: motivate the thread safety with a global counter
Dec 16, 2024
c371ee6
Merge branch 'master' into CDRIVER-3775
Dec 16, 2024
3c18118
Remove leftover includes from attempt at cmd serialization move
Dec 16, 2024
7cbfbae
Return error on *_set_structured_log_opts misuse
Dec 17, 2024
e334612
asserts for mongoc_structured_log_opts_set_max_level_for_all_components
Dec 17, 2024
014bc8d
asserts for mongoc_structured_log_opts_set_max_level_for_component
Dec 17, 2024
20f9890
Include errorLabels in logged client-side command failures
Dec 17, 2024
07f49b2
Refactor failure paths in bson-macros ASSERTs
Dec 17, 2024
c80b4df
Merge branch 'master' into CDRIVER-3775
Dec 17, 2024
9338b95
Fix out-of-date comment about test_is_suppressing_structured_logs
Dec 17, 2024
a75f151
make ignored error in mongoc_structured_log_opts_new very clear
Dec 17, 2024
5f13444
More case insensitive: docs, unlimited length
Dec 17, 2024
4633353
Merge branch 'master' into CDRIVER-3775
Dec 19, 2024
932b73b
missing bson_t hyperlink in doc
Jan 8, 2025
4d910a7
Warning about multiple instances writing to a shared log file
Jan 8, 2025
2d853e7
typo in comment
Jan 9, 2025
f40496c
Typo in test runner error message
Jan 9, 2025
eb793c0
Merge branch 'master' into CDRIVER-3775
Jan 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/common/src/bson-dsl.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,12 @@ Generate a UTF-8 value from the given null-terminated character array beginning
at `zstr`.


#### `oid(const bson_oid_t* oid)`

Generate an ObjectId value from the given C expression that evaluates to
a bson_oid_t pointer.


#### `utf8_w_len(const char* str, int len)`

Generate a UTF-8 value from the character array beginning at `str`, with length
Expand Down
7 changes: 7 additions & 0 deletions src/common/src/common-bson-dsl-private.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,13 @@ BSON_IF_GNU_LIKE (_Pragma ("GCC diagnostic ignored \"-Wshadow\""))
#define _bsonArrayOperation_boolean(X) _bsonArrayAppendValue (boolean (X))
#define _bsonValueOperation_boolean(b) _bsonValueOperation_bool (b)

#define _bsonValueOperation_oid(o) \
if (!bson_append_oid (_bsonBuildAppendArgs, (o))) { \
bsonBuildError = "Error while appending oid(" _bsonDSL_str (o) ")"; \
} else \
((void) 0)
#define _bsonArrayOperation_oid(X) _bsonArrayAppendValue (oid (X))

#define _bsonValueOperation_null \
if (!bson_append_null (_bsonBuildAppendArgs)) { \
bsonBuildError = "Error while appending a null"; \
Expand Down
36 changes: 36 additions & 0 deletions src/common/src/common-oid-private.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Copyright 2009-present MongoDB, 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.
*/

#include "common-prelude.h"

#ifndef MONGO_C_DRIVER_COMMON_OID_PRIVATE_H
#define MONGO_C_DRIVER_COMMON_OID_PRIVATE_H

#include <bson/bson.h>

BSON_BEGIN_DECLS

extern const bson_oid_t kZeroObjectId;

void
mcommon_oid_set_zero (bson_oid_t *oid);

bool
mcommon_oid_is_zero (const bson_oid_t *oid);

BSON_END_DECLS

#endif /* MONGO_C_DRIVER_COMMON_OID_PRIVATE_H */
33 changes: 33 additions & 0 deletions src/common/src/common-oid.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Copyright 2009-present MongoDB, 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.
*/

#include <common-oid-private.h>

const bson_oid_t kZeroObjectId = {{0}};

void
mcommon_oid_set_zero (bson_oid_t *oid)
{
BSON_ASSERT (oid);
memset (oid, 0, sizeof *oid);
}

bool
mcommon_oid_is_zero (const bson_oid_t *oid)
{
BSON_ASSERT (oid);
return bson_oid_equal_unsafe (oid, &kZeroObjectId);
}
42 changes: 42 additions & 0 deletions src/common/tests/test-common-oid.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* Copyright 2009-present MongoDB, 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.
*/

#include "TestSuite.h"

#include <common-oid-private.h>

static void
test_mcommon_oid_zero (void)
{
bson_oid_t oid;
bson_oid_init_from_string (&oid, "000000000000000000000000");
BSON_ASSERT (true == bson_oid_equal (&oid, &kZeroObjectId));
BSON_ASSERT (true == mcommon_oid_is_zero (&oid));
bson_oid_init_from_string (&oid, "010000000000000000000000");
BSON_ASSERT (false == mcommon_oid_is_zero (&oid));
bson_oid_init_from_string (&oid, "000000000000000000000001");
BSON_ASSERT (false == mcommon_oid_is_zero (&oid));
bson_oid_init_from_string (&oid, "ffffffffffffffffffffffff");
BSON_ASSERT (false == mcommon_oid_is_zero (&oid));
mcommon_oid_set_zero (&oid);
BSON_ASSERT (true == mcommon_oid_is_zero (&oid));
}

void
test_mcommon_oid_install (TestSuite *suite)
{
TestSuite_Add (suite, "/mcommon/oid/zero", test_mcommon_oid_zero);
}
70 changes: 45 additions & 25 deletions src/libbson/src/bson/bson-macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@


#include <stdio.h>
#include <stdlib.h>

#ifdef __cplusplus
#include <algorithm>
Expand Down Expand Up @@ -190,25 +191,52 @@
#define BSON_FUNC __func__
#endif

#define BSON_ASSERT(test) \
do { \
if (!(BSON_LIKELY (test))) { \
fprintf (stderr, "%s:%d %s(): precondition failed: %s\n", __FILE__, (int) (__LINE__), BSON_FUNC, #test); \
abort (); \
} \

#if defined(_MSC_VER)
#define BSON_INLINE __inline
#else
#define BSON_INLINE __inline__
#endif


#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
#define BSON_NORETURN noreturn
#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
#define BSON_NORETURN _Noreturn
#elif defined(__GNUC__) && 2 < __GNUC__ + (8 <= __GNUC_MINOR__)
#define BSON_NORETURN __attribute__ ((__noreturn__))
#else
#define BSON_NORETURN
#endif


static BSON_INLINE BSON_NORETURN void
_bson_assert_failed_on_line (const char *file, int line, const char *func, const char *test)
{
fprintf (stderr, "%s:%d %s(): assertion failed: %s\n", file, line, func, test);
abort ();
}

static BSON_INLINE BSON_NORETURN void
_bson_assert_failed_on_param (const char *param, const char *func)
{
fprintf (stderr, "The parameter: %s, in function %s, cannot be NULL\n", param, func);
abort ();
}

#define BSON_ASSERT(test) \
do { \
if (!(BSON_LIKELY (test))) { \
_bson_assert_failed_on_line (__FILE__, (int) (__LINE__), BSON_FUNC, #test); \
} \
} while (0)

/**
* @brief Assert the expression `Assertion`, and evaluates to `Value` on
* success.
*/
#define BSON_ASSERT_INLINE(Assertion, Value) \
((void) ((Assertion) \
? (0) \
: ((fprintf ( \
stderr, "%s:%d %s(): Assertion '%s' failed", __FILE__, (int) (__LINE__), BSON_FUNC, #Assertion), \
abort ()), \
0)), \
((void) ((Assertion) ? (0) : (_bson_assert_failed_on_line (__FILE__, (int) (__LINE__), BSON_FUNC, #Assertion), 0)), \
Value)

/**
Expand All @@ -225,12 +253,11 @@
#define BSON_ASSERT_PTR_INLINE(Pointer) BSON_ASSERT_INLINE ((Pointer) != NULL, (Pointer))

/* Used for asserting parameters to provide a more precise error message */
#define BSON_ASSERT_PARAM(param) \
do { \
if ((BSON_UNLIKELY (param == NULL))) { \
fprintf (stderr, "The parameter: %s, in function %s, cannot be NULL\n", #param, BSON_FUNC); \
abort (); \
} \
#define BSON_ASSERT_PARAM(param) \
do { \
if ((BSON_UNLIKELY (param == NULL))) { \
_bson_assert_failed_on_param (#param, BSON_FUNC); \
} \
} while (0)

// `BSON_OPTIONAL_PARAM` is a documentation-only macro to document X may be NULL.
Expand Down Expand Up @@ -294,13 +321,6 @@
#endif


#if defined(_MSC_VER)
#define BSON_INLINE __inline
#else
#define BSON_INLINE __inline__
#endif


#ifdef _MSC_VER
#define BSON_ENSURE_ARRAY_PARAM_SIZE(_n)
#define BSON_TYPEOF decltype
Expand Down
8 changes: 0 additions & 8 deletions src/libbson/src/bson/bson-timegm.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,6 @@
#define ATTRIBUTE_FORMAT(spec) /* empty */
#endif

#if !defined _Noreturn && (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112)
#if 2 < __GNUC__ + (8 <= __GNUC_MINOR__)
#define _Noreturn __attribute__ ((__noreturn__))
#else
#define _Noreturn
#endif
#endif

#if !defined(__STDC_VERSION__) && !defined restrict
#define restrict /* empty */
#endif
Expand Down
1 change: 1 addition & 0 deletions src/libmongoc/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ example-scram
example-sdam-monitoring
example-session
example-start-at-optime
example-structured-log
example-transaction
example-update
fam
Expand Down
7 changes: 7 additions & 0 deletions src/libmongoc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,7 @@ set (MONGOC_SOURCES
${PROJECT_SOURCE_DIR}/src/mongoc/mongoc-stream-gridfs-download.c
${PROJECT_SOURCE_DIR}/src/mongoc/mongoc-stream-gridfs-upload.c
${PROJECT_SOURCE_DIR}/src/mongoc/mongoc-stream-socket.c
${PROJECT_SOURCE_DIR}/src/mongoc/mongoc-structured-log.c
${PROJECT_SOURCE_DIR}/src/mongoc/mongoc-timeout.c
${PROJECT_SOURCE_DIR}/src/mongoc/mongoc-topology.c
${PROJECT_SOURCE_DIR}/src/mongoc/mongoc-topology-background-monitoring.c
Expand All @@ -664,6 +665,7 @@ set (MONGOC_SOURCES
${mongo-c-driver_SOURCE_DIR}/src/common/src/common-atomic.c
${mongo-c-driver_SOURCE_DIR}/src/common/src/common-b64.c
${mongo-c-driver_SOURCE_DIR}/src/common/src/common-md5.c
${mongo-c-driver_SOURCE_DIR}/src/common/src/common-oid.c
${mongo-c-driver_SOURCE_DIR}/src/common/src/common-thread.c

${PROJECT_SOURCE_DIR}/src/mongoc/mongoc-crypto.c
Expand Down Expand Up @@ -762,6 +764,7 @@ set (HEADERS
${PROJECT_SOURCE_DIR}/src/mongoc/mongoc-stream-file.h
${PROJECT_SOURCE_DIR}/src/mongoc/mongoc-stream-gridfs.h
${PROJECT_SOURCE_DIR}/src/mongoc/mongoc-stream-socket.h
${PROJECT_SOURCE_DIR}/src/mongoc/mongoc-structured-log.h
${PROJECT_SOURCE_DIR}/src/mongoc/mongoc-topology-description.h
${PROJECT_SOURCE_DIR}/src/mongoc/mongoc-uri.h
${PROJECT_SOURCE_DIR}/src/mongoc/mongoc-version-functions.h
Expand Down Expand Up @@ -1031,6 +1034,7 @@ endif ()
set (test-libmongoc-sources
${mongo-c-driver_SOURCE_DIR}/src/common/tests/test-common-atomic.c
${mongo-c-driver_SOURCE_DIR}/src/common/tests/test-common-cmp.c
${mongo-c-driver_SOURCE_DIR}/src/common/tests/test-common-oid.c
${mongo-c-driver_SOURCE_DIR}/src/libbson/tests/corpus-test.c
${mongo-c-driver_SOURCE_DIR}/src/libbson/tests/corpus-test.h
${mongo-c-driver_SOURCE_DIR}/src/libbson/tests/test-atomic.c
Expand Down Expand Up @@ -1141,6 +1145,7 @@ set (test-libmongoc-sources
${PROJECT_SOURCE_DIR}/tests/test-mongoc-ssl.c
${PROJECT_SOURCE_DIR}/tests/test-mongoc-stream.c
${PROJECT_SOURCE_DIR}/tests/test-mongoc-streamable-hello.c
${PROJECT_SOURCE_DIR}/tests/test-mongoc-structured-log.c
${PROJECT_SOURCE_DIR}/tests/test-mongoc-thread.c
${PROJECT_SOURCE_DIR}/tests/test-mongoc-timeout.c
${PROJECT_SOURCE_DIR}/tests/test-mongoc-topology-description.c
Expand Down Expand Up @@ -1292,7 +1297,9 @@ if (ENABLE_EXAMPLES AND ENABLE_SHARED)
mongoc_add_example (example-gridfs ${PROJECT_SOURCE_DIR}/examples/example-gridfs.c)
mongoc_add_example (example-gridfs-bucket ${PROJECT_SOURCE_DIR}/examples/example-gridfs-bucket.c)
if (NOT WIN32 AND ENABLE_EXAMPLES)
# Examples that use pthreads
mongoc_add_example (example-pool ${PROJECT_SOURCE_DIR}/examples/example-pool.c)
mongoc_add_example (example-structured-log ${PROJECT_SOURCE_DIR}/examples/example-structured-log.c)
endif ()
mongoc_add_example (example-scram ${PROJECT_SOURCE_DIR}/examples/example-scram.c)
mongoc_add_example (example-sdam-monitoring ${PROJECT_SOURCE_DIR}/examples/example-sdam-monitoring.c)
Expand Down
Loading