blob: 45a9921f8519ca0f865951980e7a76b9a25f2a0c [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/mutex",
27 "//aos/stl_mutex",
28 "//aos/time",
29 "//aos/type_traits",
30 "@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",
62 ],
Brian Silvermancb5da1f2015-12-05 22:19:58 -050063)
64
65cc_library(
Philipp Schrader9b1790e2018-03-10 20:21:30 -080066 name = "printf_formats",
67 hdrs = [
68 "printf_formats.h",
69 ],
70 visibility = ["//visibility:public"],
71 deps = [
John Park33858a32018-09-28 23:05:48 -070072 "//aos:macros",
Philipp Schrader9b1790e2018-03-10 20:21:30 -080073 ],
Austin Schuh044e18b2015-10-21 20:17:09 -070074)
75
76cc_library(
Philipp Schrader9b1790e2018-03-10 20:21:30 -080077 name = "implementations",
Philipp Schrader9b1790e2018-03-10 20:21:30 -080078 visibility = ["//visibility:public"],
79 deps = [
80 ":logging",
Philipp Schrader9b1790e2018-03-10 20:21:30 -080081 ],
Brian Silvermanf480a612015-09-13 02:22:01 -040082)
Tyler Chatow67ddb032020-01-12 14:30:04 -080083
84flatbuffer_cc_library(
85 name = "log_message_fbs",
86 srcs = ["log_message.fbs"],
Tyler Chatow67ddb032020-01-12 14:30:04 -080087 gen_reflections = 1,
Austin Schuha4f69d62020-02-28 13:58:14 -080088 visibility = ["//visibility:public"],
Tyler Chatow67ddb032020-01-12 14:30:04 -080089)