| 41 | namespace ndksamples::base { |
| 42 | |
| 43 | static const char* GetFileBasename(const char* file) { |
| 44 | // We can't use basename(3) even on Unix because the Mac doesn't |
| 45 | // have a non-modifying basename. |
| 46 | const char* last_slash = strrchr(file, '/'); |
| 47 | if (last_slash != nullptr) { |
| 48 | return last_slash + 1; |
| 49 | } |
| 50 | return file; |
| 51 | } |
| 52 | |
| 53 | static int32_t LogIdTolog_id_t(LogId log_id) { |
| 54 | switch (log_id) { |