Skip to content

Commit bff154e

Browse files
committed
📚 Update logging docs
Problem: - Documentation for logging is quite out of date. Solution: - Update it to reflect the latest functionality.
1 parent c388a4d commit bff154e

File tree

6 files changed

+282
-248
lines changed

6 files changed

+282
-248
lines changed

.github/workflows/asciidoctor-ghpages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242

4343
- name: Install Mermaid
4444
run: |
45-
npm install -g @mermaid-js/mermaid-cli@11.4.2
45+
npm install -g @mermaid-js/mermaid-cli@11.12.0
4646
npx puppeteer browsers install chrome-headless-shell
4747
4848
- name: Install asciidoctor

docs/implementation_details.adoc

Lines changed: 0 additions & 157 deletions
This file was deleted.

docs/index.adoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,3 @@ include::logging.adoc[]
1313
include::interrupts.adoc[]
1414
include::match.adoc[]
1515
include::message.adoc[]
16-
include::implementation_details.adoc[]

docs/intro.adoc

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ The library dependencies are:
3636
- https://github.com/intel/cpp-std-extensions[C++ std extensions (`stdx`)]
3737
- https://github.com/intel/cpp-baremetal-concurrency[Baremetal Concurrency (`conc`)]
3838
- https://github.com/intel/cpp-senders-and-receivers[Baremetal Senders and Receivers (`async`)]
39-
- https://github.com/fmtlib/fmt[fmt]
39+
- https://github.com/fmtlib/fmt[fmtlib]
40+
41+
NOTE: `fmtlib` is used at compile-time only; there is no runtime formatting in `cib`.
4042

4143
=== Functionality
4244

@@ -54,3 +56,23 @@ Various sub-libraries within CIB form a dependency graph. `cib` is an omnibus
5456
library that contains all the functionality.
5557

5658
mermaid::library_deps.mmd[format="svg"]
59+
60+
=== Getting Started
61+
62+
`cib` is a header-only library, so you can get started by cloning the repository
63+
(or bringing it in as a submodule) and adding the include directory to your
64+
build target. Depending on which part(s) of `cib` you are using, you may also
65+
need to pull in the dependencies.
66+
67+
Alternatively, consuming `cib` with https://github.com/cpm-cmake/CPM.cmake[CPM]
68+
can be a couple of lines:
69+
70+
[source,cmake]
71+
----
72+
cpmaddpackage("gh:intel/compile-time-init-build#1abcdef")
73+
74+
target_link_libraries(my_project PUBLIC cib)
75+
----
76+
77+
Where `1abcdef` is the git hash. You can also use any of the sub-libraries (for
78+
example, `cib_log_binary`) in this way.

docs/log_build_process.mmd

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
block
2+
columns 6
3+
app_cpp("main.cpp") lib_cpp("lib.cpp") space:4
4+
space:3 ud("undefined_symbols.txt") space:2
5+
space:6
6+
block:B:2
7+
columns 2
8+
obj("main.o")
9+
lib("lib.a")
10+
space
11+
strings("strings.a")
12+
end space
13+
block:A:3
14+
gen_cpp("strings.cpp")
15+
gen_json("strings.json")
16+
gen_xml("strings.xml")
17+
end
18+
space:6
19+
space app("a.out") space:2 log("log decoder") space
20+
21+
app_cpp-- "compile" -->obj
22+
lib_cpp-- "compile" -->lib
23+
lib-- "nm" -->ud
24+
ud-- "generate" -->A
25+
gen_cpp-- "compile" -->strings
26+
gen_cpp-- "compile" -->strings
27+
B-- "link + LTO" -->app
28+
gen_json-->log
29+
gen_xml-->log
30+
app-- "run" -->log

0 commit comments

Comments
 (0)