示例#1
0
文件: json.c 项目: 0-T-0/goaccess
/* Entry point to output panel's metadata. */
static void
print_meta_data (FILE * fp, GHolder * h, int sp)
{
  int isp = 0, iisp = 0;
  /* use tabs to prettify output */
  if (conf.json_pretty_print)
    isp = sp + 1, iisp = sp + 2;

  print_open_meta_attr (fp, isp);

  pmeta_data_avgts (fp, h->module, iisp);
  pmeta_data_cumts (fp, h->module, iisp);
  pmeta_data_maxts (fp, h->module, iisp);
  pmeta_data_bw (fp, h->module, iisp);
  pmeta_data_visitors (fp, h->module, iisp);
  pmeta_data_hits (fp, h->module, iisp);

  print_close_meta_attr (fp, isp);
}
示例#2
0
文件: json.c 项目: aishikoyo/goaccess
/* Entry point to output panel's metadata. */
static void
print_meta_data (GJSON * json, GHolder * h, int sp)
{
  int isp = 0, iisp = 0;
  /* use tabs to prettify output */
  if (conf.json_pretty_print)
    isp = sp + 1, iisp = sp + 2;

  popen_obj_attr (json, "metadata", isp);

  pmeta_data_avgts (json, h->module, iisp);
  pmeta_data_cumts (json, h->module, iisp);
  pmeta_data_maxts (json, h->module, iisp);
  pmeta_data_bw (json, h->module, iisp);
  pmeta_data_visitors (json, h->module, iisp);
  pmeta_data_hits (json, h->module, iisp);
  pmeta_data_unique (json, h->ht_size, iisp);

  pclose_obj (json, isp, 0);
}