File tree Expand file tree Collapse file tree 5 files changed +72
-0
lines changed Expand file tree Collapse file tree 5 files changed +72
-0
lines changed Original file line number Diff line number Diff line change @@ -539,6 +539,7 @@ set (SOURCES ${SOURCES}
539
539
${PROJECT_SOURCE_DIR} /src/mongoc/mongoc-stream-socket.c
540
540
${PROJECT_SOURCE_DIR} /src/mongoc/mongoc-structured-log.c
541
541
${PROJECT_SOURCE_DIR} /src/mongoc/mongoc-structured-log-command.c
542
+ ${PROJECT_SOURCE_DIR} /src/mongoc/mongoc-structured-log-connection.c
542
543
${PROJECT_SOURCE_DIR} /src/mongoc/mongoc-topology.c
543
544
${PROJECT_SOURCE_DIR} /src/mongoc/mongoc-topology-background-monitoring.c
544
545
${PROJECT_SOURCE_DIR} /src/mongoc/mongoc-topology-description.c
Original file line number Diff line number Diff line change @@ -157,6 +157,7 @@ set (src_libmongoc_src_mongoc_DIST_noinst_hs
157
157
mongoc-stream-gridfs-download-private.h
158
158
mongoc-stream-gridfs-upload-private.h
159
159
mongoc-structured-log-command-private.h
160
+ mongoc-structured-log-connection-private.h
160
161
mongoc-structured-log-private.h
161
162
mongoc-thread-private.h
162
163
mongoc-topology-description-apm-private.h
Original file line number Diff line number Diff line change 68
68
#include "mongoc-cmd-private.h"
69
69
#include "mongoc-opts-private.h"
70
70
#include "mongoc-structured-log-command-private.h"
71
+ #include "mongoc-structured-log-connection-private.h"
71
72
#endif
72
73
73
74
@@ -1169,6 +1170,8 @@ _mongoc_client_new_from_uri (mongoc_topology_t *topology)
1169
1170
}
1170
1171
#endif
1171
1172
1173
+ mongoc_structured_log_connection_client_created ();
1174
+
1172
1175
mongoc_counter_clients_active_inc ();
1173
1176
1174
1177
return client ;
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright 2020 MongoDB, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #include "mongoc-prelude.h"
18
+ #include "mongoc-structured-log.h"
19
+ #include "mongoc-cmd-private.h"
20
+
21
+ #ifndef MONGOC_STRUCTRURED_LOG_CONNECTION_PRIVATE_H
22
+ #define MONGOC_STRUCTRURED_LOG_CONNECTION_PRIVATE_H
23
+
24
+ void
25
+ mongoc_structured_log_connection_client_created ();
26
+
27
+ #endif /* MONGOC_STRUCTURED_LOG_COMMAND_PRIVATE_H */
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright 2020 MongoDB, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+
18
+ #if defined(__linux__ )
19
+ #include <sys/syscall.h>
20
+ #elif defined(_WIN32 )
21
+ #include <process.h>
22
+ #elif defined(__FreeBSD__ )
23
+ #include <sys/thr.h>
24
+ #else
25
+ #include <unistd.h>
26
+ #endif
27
+ #include <time.h>
28
+
29
+ #include "mongoc-structured-log-private.h"
30
+
31
+ void
32
+ mongoc_structured_log_connection_client_created ()
33
+ {
34
+ mongoc_structured_log (MONGOC_STRUCTURED_LOG_LEVEL_DEBUG ,
35
+ MONGOC_STRUCTURED_LOG_COMPONENT_CONNECTION ,
36
+ "Client created" ,
37
+ NULL ,
38
+ NULL );
39
+
40
+ }
You can’t perform that action at this time.
0 commit comments