| 127 | } |
| 128 | |
| 129 | std::string GetLocalHostName() { |
| 130 | char str[kMaxHostNameSize + 1]; |
| 131 | if (0 != gethostname(str, kMaxHostNameSize + 1)) { |
| 132 | LOG(FATAL) << "gethostname fail"; |
| 133 | exit(1); |
| 134 | } |
| 135 | std::string hostname(str); |
| 136 | return hostname; |
| 137 | } |
| 138 | |
| 139 | void SetupLog(const std::string& name) { |
| 140 | // log info/warning/error/fatal to tera.log |
no outgoing calls
no test coverage detected