blob: a9fcb147a562b178c04febe8c49e9cfb1e8cd750 [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",
Brian Silvermanb47f5552020-10-01 15:08:14 -070024 "//aos:thread_local",
John Park33858a32018-09-28 23:05:48 -070025 "//aos/libc:aos_strerror",
Austin Schuha0c41ba2020-09-10 22:59:14 -070026 "//aos/stl_mutex",
27 "//aos/time",
28 "//aos/type_traits",
Brian Silverman1463c092020-10-30 17:28:24 -070029 "@com_github_google_glog//:glog",
Austin Schuha0c41ba2020-09-10 22:59:14 -070030 "@com_google_absl//absl/base",
Philipp Schrader9b1790e2018-03-10 20:21:30 -080031 ],
Brian Silvermancb5da1f2015-12-05 22:19:58 -050032)
Austin Schuhf0736512015-09-07 01:22:16 -070033
James Kuszmaul011b67a2019-12-15 12:52:34 -080034cc_library(
35 name = "log_namer",
36 srcs = ["log_namer.cc"],
37 hdrs = ["log_namer.h"],
38 copts = ["-Wno-format-nonliteral"],
39 visibility = ["//visibility:public"],
40 deps = [
41 "//aos:configuration",
42 "@com_github_google_glog//:glog",
43 ],
44)
45
Brian Silverman100534c2015-09-07 15:51:23 -040046cc_library(
Philipp Schrader9b1790e2018-03-10 20:21:30 -080047 name = "sizes",
48 hdrs = [
49 "sizes.h",
50 ],
Austin Schuh044e18b2015-10-21 20:17:09 -070051)
52
Brian Silvermancb5da1f2015-12-05 22:19:58 -050053cc_test(
Philipp Schrader9b1790e2018-03-10 20:21:30 -080054 name = "implementations_test",
55 srcs = [
56 "implementations_test.cc",
57 ],
58 deps = [
59 ":implementations",
60 ":logging",
61 "//aos/testing:googletest",
Brian Silverman1463c092020-10-30 17:28:24 -070062 "@com_github_google_glog//:glog",
Philipp Schrader9b1790e2018-03-10 20:21:30 -080063 ],
Brian Silvermancb5da1f2015-12-05 22:19:58 -050064)
65
66cc_library(
Philipp Schrader9b1790e2018-03-10 20:21:30 -080067 name = "printf_formats",
68 hdrs = [
69 "printf_formats.h",
70 ],
71 visibility = ["//visibility:public"],
72 deps = [
John Park33858a32018-09-28 23:05:48 -070073 "//aos:macros",
Philipp Schrader9b1790e2018-03-10 20:21:30 -080074 ],
Austin Schuh044e18b2015-10-21 20:17:09 -070075)
76
77cc_library(
Philipp Schrader9b1790e2018-03-10 20:21:30 -080078 name = "implementations",
Philipp Schrader9b1790e2018-03-10 20:21:30 -080079 visibility = ["//visibility:public"],
80 deps = [
81 ":logging",
Philipp Schrader9b1790e2018-03-10 20:21:30 -080082 ],
Brian Silvermanf480a612015-09-13 02:22:01 -040083)
Tyler Chatow67ddb032020-01-12 14:30:04 -080084
85flatbuffer_cc_library(
86 name = "log_message_fbs",
87 srcs = ["log_message.fbs"],
Tyler Chatow67ddb032020-01-12 14:30:04 -080088 gen_reflections = 1,
Austin Schuha4f69d62020-02-28 13:58:14 -080089 visibility = ["//visibility:public"],
Tyler Chatow67ddb032020-01-12 14:30:04 -080090)