Commit 4297543
committed
Use spdlog for logging in Gloo
Change Gloo logging macros to use SPDLOG_* macros for logging. This
change is largely mechanical - changing the structure of the logging
calls to use fmtlib::fmt-style formatting. For example:
GLOO_DEBUG("thingOne=", thingOne, " thingTwo=", thingTwo);
becomes:
GLOO_DEBUG("thingOne={} thingTwo={}", thingOne, thingTwo);
However, there are also some less mechanical changes:
- Since we don't want to expose spdlog as a public dependency of Gloo,
the logging infrastructure is moved into a different header
(gloo/common/log.h). This header is not included in GLOO_HDRS, so it
is not installed. It should only ever be included by .cc files, or
non-public headers.
- Due to the previous change, the GLOO_ENFORCE_* macros are moved into
a separate header (gloo/common/enforce.h). These are used often in
public header files, and are not inherently tied to the logging, so
this made the most sense.
- gloo/common/log.h (effectively renamed from logging.h) no longer needs
a .cc file, as it just passes GLOO_* macros through to the SPDLOG_*
macros.
- gloo has no init function which must be called first, and can be built
as a static library (precluding something like
__attribute__((constructor))). For this reason, all logger calls are
prefixed with a std::run_once which ensures the logger init/config is
performed before the first use of the logger.
- gloo/transport/tcp/debug_logger.{h,cc} are deleted, and replaced with
a custom fmt formatter implementation in gloo/transport/debug_data.h.
- Wherever lists of includes were touched as part of this change, they
were reformatted/fixed (e.g. X.h -> cX, alphabetical re-ordering,
changing gloo includes from <> to "").1 parent cc00f41 commit 4297543
File tree
72 files changed
+254
-271
lines changed- docs
- gloo
- benchmark
- common
- mpi
- nccl
- rendezvous
- test
- transport
- ibverbs
- tcp
- tls
- uv
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
72 files changed
+254
-271
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
0 commit comments