Brian Silverman | cb5da1f | 2015-12-05 22:19:58 -0500 | [diff] [blame] | 1 | # The primary client logging interface. |
| 2 | cc_library( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 3 | name = "logging", |
| 4 | srcs = [ |
| 5 | "context.cc", |
| 6 | "interface.cc", |
| 7 | ], |
| 8 | hdrs = [ |
| 9 | "context.h", |
| 10 | "interface.h", |
| 11 | "logging.h", |
| 12 | ], |
| 13 | visibility = ["//visibility:public"], |
| 14 | deps = [ |
| 15 | ":sizes", |
Austin Schuh | df6cbb1 | 2019-02-02 13:46:52 -0800 | [diff] [blame] | 16 | "//aos:complex_thread_local", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 17 | "//aos:die", |
| 18 | "//aos:macros", |
| 19 | "//aos/libc:aos_strerror", |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 20 | ], |
Brian Silverman | cb5da1f | 2015-12-05 22:19:58 -0500 | [diff] [blame] | 21 | ) |
Austin Schuh | f073651 | 2015-09-07 01:22:16 -0700 | [diff] [blame] | 22 | |
James Kuszmaul | 011b67a | 2019-12-15 12:52:34 -0800 | [diff] [blame^] | 23 | cc_library( |
| 24 | name = "log_namer", |
| 25 | srcs = ["log_namer.cc"], |
| 26 | hdrs = ["log_namer.h"], |
| 27 | copts = ["-Wno-format-nonliteral"], |
| 28 | visibility = ["//visibility:public"], |
| 29 | deps = [ |
| 30 | "//aos:configuration", |
| 31 | "@com_github_google_glog//:glog", |
| 32 | ], |
| 33 | ) |
| 34 | |
Brian Silverman | f44f124 | 2015-12-05 20:19:48 -0500 | [diff] [blame] | 35 | cc_binary( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 36 | name = "binary_log_writer", |
| 37 | srcs = [ |
| 38 | "binary_log_writer.cc", |
| 39 | ], |
| 40 | visibility = ["//visibility:public"], |
| 41 | deps = [ |
| 42 | ":binary_log_file", |
| 43 | ":implementations", |
James Kuszmaul | 011b67a | 2019-12-15 12:52:34 -0800 | [diff] [blame^] | 44 | ":log_namer", |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 45 | ":logging", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 46 | "//aos:configuration", |
Austin Schuh | df6cbb1 | 2019-02-02 13:46:52 -0800 | [diff] [blame] | 47 | "//aos:die", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 48 | "//aos:init", |
| 49 | "//aos/ipc_lib:queue", |
Austin Schuh | df6cbb1 | 2019-02-02 13:46:52 -0800 | [diff] [blame] | 50 | "//aos/time", |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 51 | ], |
Brian Silverman | f44f124 | 2015-12-05 20:19:48 -0500 | [diff] [blame] | 52 | ) |
| 53 | |
| 54 | cc_binary( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 55 | name = "log_streamer", |
| 56 | srcs = [ |
| 57 | "log_streamer.cc", |
| 58 | ], |
| 59 | visibility = ["//visibility:public"], |
| 60 | deps = [ |
| 61 | ":implementations", |
| 62 | ":logging", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 63 | "//aos:init", |
| 64 | "//aos/ipc_lib:queue", |
Austin Schuh | df6cbb1 | 2019-02-02 13:46:52 -0800 | [diff] [blame] | 65 | "//aos/time", |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 66 | ], |
Brian Silverman | f44f124 | 2015-12-05 20:19:48 -0500 | [diff] [blame] | 67 | ) |
| 68 | |
| 69 | cc_binary( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 70 | name = "log_displayer", |
| 71 | srcs = [ |
| 72 | "log_displayer.cc", |
| 73 | ], |
| 74 | visibility = ["//visibility:public"], |
| 75 | deps = [ |
| 76 | ":binary_log_file", |
| 77 | ":implementations", |
| 78 | ":logging", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 79 | "//aos:configuration", |
| 80 | "//aos:init", |
Austin Schuh | df6cbb1 | 2019-02-02 13:46:52 -0800 | [diff] [blame] | 81 | "//aos/util:string_to_num", |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 82 | ], |
Brian Silverman | f44f124 | 2015-12-05 20:19:48 -0500 | [diff] [blame] | 83 | ) |
| 84 | |
| 85 | cc_library( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 86 | name = "binary_log_file", |
| 87 | srcs = [ |
| 88 | "binary_log_file.cc", |
| 89 | ], |
| 90 | hdrs = [ |
| 91 | "binary_log_file.h", |
| 92 | ], |
| 93 | deps = [ |
| 94 | ":implementations", |
| 95 | ], |
Austin Schuh | f073651 | 2015-09-07 01:22:16 -0700 | [diff] [blame] | 96 | ) |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 97 | |
| 98 | cc_library( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 99 | name = "sizes", |
| 100 | hdrs = [ |
| 101 | "sizes.h", |
| 102 | ], |
Austin Schuh | 044e18b | 2015-10-21 20:17:09 -0700 | [diff] [blame] | 103 | ) |
| 104 | |
Brian Silverman | cb5da1f | 2015-12-05 22:19:58 -0500 | [diff] [blame] | 105 | cc_test( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 106 | name = "implementations_test", |
| 107 | srcs = [ |
| 108 | "implementations_test.cc", |
| 109 | ], |
| 110 | deps = [ |
| 111 | ":implementations", |
| 112 | ":logging", |
| 113 | "//aos/testing:googletest", |
| 114 | ], |
Brian Silverman | cb5da1f | 2015-12-05 22:19:58 -0500 | [diff] [blame] | 115 | ) |
| 116 | |
| 117 | cc_library( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 118 | name = "printf_formats", |
| 119 | hdrs = [ |
| 120 | "printf_formats.h", |
| 121 | ], |
| 122 | visibility = ["//visibility:public"], |
| 123 | deps = [ |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 124 | "//aos:macros", |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 125 | ], |
Austin Schuh | 044e18b | 2015-10-21 20:17:09 -0700 | [diff] [blame] | 126 | ) |
| 127 | |
| 128 | cc_library( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 129 | name = "implementations", |
| 130 | srcs = [ |
| 131 | "implementations.cc", |
| 132 | ], |
| 133 | hdrs = [ |
| 134 | "implementations.h", |
| 135 | ], |
| 136 | linkopts = [ |
| 137 | "-lpthread", |
| 138 | ], |
| 139 | visibility = ["//visibility:public"], |
| 140 | deps = [ |
| 141 | ":logging", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 142 | ":printf_formats", |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 143 | ":sizes", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 144 | "//aos:die", |
| 145 | "//aos:macros", |
Austin Schuh | df6cbb1 | 2019-02-02 13:46:52 -0800 | [diff] [blame] | 146 | "//aos:once", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 147 | "//aos/ipc_lib:queue", |
Austin Schuh | df6cbb1 | 2019-02-02 13:46:52 -0800 | [diff] [blame] | 148 | "//aos/mutex", |
| 149 | "//aos/time", |
| 150 | "//aos/type_traits", |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 151 | ], |
Brian Silverman | f480a61 | 2015-09-13 02:22:01 -0400 | [diff] [blame] | 152 | ) |