cloudflare / logshare

logshare is a library & CLI client for retrieving logs from Cloudflare's Enterprise Log Share service.
https://support.cloudflare.com/hc/en-us/articles/216672448
BSD 3-Clause "New" or "Revised" License
80 stars 24 forks source link

[feat] Add fields support #4

Closed elithrar closed 7 years ago

elithrar commented 7 years ago

Support the new --fields option, which allows specifying the fields to be returned in each log-line.

e.g.

logshare-cli --api-email=$CF_API_EMAIL --api-key=$CF_API_KEY \
  --zone-name=$CF_ZONE_NAME --start-time=`hours-ago 1` \
  --end-time=`mins-ago 10` --count=2 \
  --fields=RayID,ClientIP --by-received