Lines Matching refs:log

76 static int cal_log_filepath(char **out, const struct log_t *log,  in cal_log_filepath()  argument
84 if (!out || !log || !desdir) in cal_log_filepath()
87 if (is_ac_filefmt(log->path)) in cal_log_filepath()
90 filename = log->name; in cal_log_filepath()
95 if (!strcmp(log->type, "cmd") || log->lines) in cal_log_filepath()
179 static void get_log_by_type(const char *despath, const struct log_t *log, in get_log_by_type() argument
182 if (!despath || !log || !srcpath) in get_log_by_type()
185 if (!strcmp("file", log->type)) { in get_log_by_type()
188 if (!log->lines) in get_log_by_type()
191 if (cfg_atoi(log->lines, log->lines_len, &lines) == -1) in get_log_by_type()
194 } else if (!strcmp("node", log->type)) { in get_log_by_type()
197 if (!log->sizelimit) in get_log_by_type()
200 if (cfg_atoi(log->sizelimit, log->sizelimit_len, in get_log_by_type()
205 else if (!strcmp("cmd", log->type)) in get_log_by_type()
208 if (log->deletesource && !strcmp("true", log->deletesource)) in get_log_by_type()
212 static void crashlog_get_log(struct log_t *log, void *data) in crashlog_get_log() argument
222 if (is_ac_filefmt(log->path)) { in crashlog_get_log()
227 const int count = config_fmt_to_files(log->path, &files); in crashlog_get_log()
230 LOGE("parse config format (%s) failed\n", log->path); in crashlog_get_log()
234 LOGW("no logs found for (%s)\n", log->name); in crashlog_get_log()
242 log->name); in crashlog_get_log()
245 res = cal_log_filepath(&des, log, name, desdir); in crashlog_get_log()
251 get_log_by_type(des, log, files[i]); in crashlog_get_log()
259 res = cal_log_filepath(&des, log, log->name, desdir); in crashlog_get_log()
265 get_log_by_type(des, log, log->path); in crashlog_get_log()
272 LOGD("get (%s) spend %ds\n", log->name, spent); in crashlog_get_log()
274 LOGW("get (%s) spend %ds\n", log->name, spent); in crashlog_get_log()
288 struct log_t *log; in crashlog_send_crash() local
306 for_each_log_collect(id, log, crash) { in crashlog_send_crash()
307 if (!log) in crashlog_send_crash()
309 log->get(log, (void *)e->dir); in crashlog_send_crash()
340 struct log_t *log; in crashlog_send_info() local
345 for_each_log_collect(id, log, info) { in crashlog_send_info()
346 if (!log) in crashlog_send_info()
348 log->get(log, (void *)e->dir); in crashlog_send_info()
395 char *log; in crashlog_send_vmevent() local
422 log = strstr(rest, ANDROID_LOGS_DIR); in crashlog_send_vmevent()
423 if (!log) in crashlog_send_vmevent()
427 vmlogpath = log + 1; in crashlog_send_vmevent()
599 struct log_t *log; in crashlog_send() local
614 for_each_log(id, log, conf) { in crashlog_send()
615 if (!log) in crashlog_send()
618 log->get = crashlog_get_log; in crashlog_send()