Use AIDL_* errors over libbase logging.
This:
- gives us line numbers in source AIDL files reflecting errors
- makes it possible aidl_parser_fuzzer can detect when we return an
error but don't provide any output logging
Bug: N/A
Test: aidl_unittest
Change-Id: I0479fd8d87547c1f0b1be754f9b8f6865db3cbef
diff --git a/main.cpp b/main.cpp
index 35178cf..69ba060 100644
--- a/main.cpp
+++ b/main.cpp
@@ -30,13 +30,9 @@
#endif
int main(int argc, char* argv[]) {
- android::base::InitLogging(argv);
- LOG(DEBUG) << "aidl starting";
-
Options options(argc, argv, kDefaultLang);
if (!options.Ok()) {
- std::cerr << options.GetErrorMessage();
- std::cerr << options.GetUsage();
+ AIDL_ERROR(options.GetErrorMessage()) << options.GetUsage();
return 1;
}