blob: 6686a3c340cd078d21798e1415e91c3917576cec [file] [log] [blame]
Tyler Chatow67ddb032020-01-12 14:30:04 -08001load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
2
Brian Silvermancb5da1f2015-12-05 22:19:58 -05003# The primary client logging interface.
4cc_library(
Philipp Schrader9b1790e2018-03-10 20:21:30 -08005 name = "logging",
6 srcs = [
7 "context.cc",
Austin Schuha0c41ba2020-09-10 22:59:14 -07008 "implementations.cc",
Philipp Schrader9b1790e2018-03-10 20:21:30 -08009 "interface.cc",
10 ],
11 hdrs = [
12 "context.h",
Austin Schuha0c41ba2020-09-10 22:59:14 -070013 "implementations.h",
Philipp Schrader9b1790e2018-03-10 20:21:30 -080014 "interface.h",
15 "logging.h",
16 ],
17 visibility = ["//visibility:public"],
18 deps = [
Austin Schuha0c41ba2020-09-10 22:59:14 -070019 ":printf_formats",
Philipp Schrader9b1790e2018-03-10 20:21:30 -080020 ":sizes",
Austin Schuhdf6cbb12019-02-02 13:46:52 -080021 "//aos:complex_thread_local",
John Park33858a32018-09-28 23:05:48 -070022 "//aos:die",
23 "//aos:macros",
24 "//aos/libc:aos_strerror",
Austin Schuha0c41ba2020-09-10 22:59:14 -070025 "//aos/mutex",
26 "//aos/stl_mutex",
27 "//aos/time",
28 "//aos/type_traits",
29 "@com_google_absl//absl/base",
Philipp Schrader9b1790e2018-03-10 20:21:30 -080030 ],
Brian Silvermancb5da1f2015-12-05 22:19:58 -050031)
Austin Schuhf0736512015-09-07 01:22:16 -070032
James Kuszmaul011b67a2019-12-15 12:52:34 -080033cc_library(
34 name = "log_namer",
35 srcs = ["log_namer.cc"],
36 hdrs = ["log_namer.h"],
37 copts = ["-Wno-format-nonliteral"],
38 visibility = ["//visibility:public"],
39 deps = [
40 "//aos:configuration",
41 "@com_github_google_glog//:glog",
42 ],
43)
44
Brian Silverman100534c2015-09-07 15:51:23 -040045cc_library(
Philipp Schrader9b1790e2018-03-10 20:21:30 -080046 name = "sizes",
47 hdrs = [
48 "sizes.h",
49 ],
Austin Schuh044e18b2015-10-21 20:17:09 -070050)
51
Brian Silvermancb5da1f2015-12-05 22:19:58 -050052cc_test(
Philipp Schrader9b1790e2018-03-10 20:21:30 -080053 name = "implementations_test",
54 srcs = [
55 "implementations_test.cc",
56 ],
57 deps = [
58 ":implementations",
59 ":logging",
60 "//aos/testing:googletest",
61 ],
Brian Silvermancb5da1f2015-12-05 22:19:58 -050062)
63
64cc_library(
Philipp Schrader9b1790e2018-03-10 20:21:30 -080065 name = "printf_formats",
66 hdrs = [
67 "printf_formats.h",
68 ],
69 visibility = ["//visibility:public"],
70 deps = [
John Park33858a32018-09-28 23:05:48 -070071 "//aos:macros",
Philipp Schrader9b1790e2018-03-10 20:21:30 -080072 ],
Austin Schuh044e18b2015-10-21 20:17:09 -070073)
74
75cc_library(
Philipp Schrader9b1790e2018-03-10 20:21:30 -080076 name = "implementations",
Philipp Schrader9b1790e2018-03-10 20:21:30 -080077 visibility = ["//visibility:public"],
78 deps = [
79 ":logging",
Philipp Schrader9b1790e2018-03-10 20:21:30 -080080 ],
Brian Silvermanf480a612015-09-13 02:22:01 -040081)
Tyler Chatow67ddb032020-01-12 14:30:04 -080082
83flatbuffer_cc_library(
84 name = "log_message_fbs",
85 srcs = ["log_message.fbs"],
Tyler Chatow67ddb032020-01-12 14:30:04 -080086 gen_reflections = 1,
Austin Schuha4f69d62020-02-28 13:58:14 -080087 visibility = ["//visibility:public"],
Tyler Chatow67ddb032020-01-12 14:30:04 -080088)