[scripts] flog: A friendly log listener

flog is a wrapper for loglistener and fsymbolize with following features:
 - Automatically decode symbols from crash logs
 - Archive crash logs with date-timed file name
 - Selectively show logs by begin-triggers, end-triggers, and suppress-triggers
 - Colorize keywords that are configurable
 - Colorize lines matching keywords that are configurable
 - Pass through remaining arguments to loglistener

[How to use]
[Example #1]
$ ./flog [device-name]

[Example #2]
$ ./flog --help

[Example #3]
$ flog --begin 'my module starts,rare event'
       --end 'my module ends'
       --suppress 'verbose,chatty'
       --lines 'error msg:red,warn:blue'
       --words 'register 0x00:green,exit:yellow'

[Screenshots for code reviewers]
https://screenshot.googleplex.com/2BUaamf0JgN
https://screenshot.googleplex.com/Cp05FbqbQzg

Change-Id: Ic68b675b82ff1c3c7e826fb31c4cb581b2b5daec
1 file changed
tree: beec1c64013a2dfb5f226554d8fe478c7d492974
  1. dart/
  2. devshell/
  3. gce/
  4. gdb/
  5. grubdisk/
  6. installer/
  7. make-fuchsia-vol/
  8. memory/
  9. rust/
  10. vbox/
  11. vim/
  12. zsh-completion/
  13. .gitignore
  14. AUTHORS
  15. build-bootable-rpi3-sdcard.sh
  16. build-bootable-usb-gigaboot.sh
  17. build-qemu.sh
  18. build-sysroot.sh
  19. build-zircon.sh
  20. build_cargo_vendor.sh
  21. check-header-guards.py
  22. check_build_status.py
  23. check_rust_licenses.py
  24. colorize_logs
  25. CONTRIBUTING.md
  26. env.sh
  27. flog
  28. generate-intellij-config.py
  29. git-file-format
  30. git-file-tidy
  31. git_utils.py
  32. install_cargo_vendor.sh
  33. jiri_update_if_green.py
  34. LICENSE
  35. makesdk.go
  36. PATENTS
  37. paths.py
  38. push-package.py
  39. README.md
  40. run-dart-action.py
  41. run-zircon-arm64
  42. run-zircon-x86-64
  43. run.py
  44. start-dhcp-server.sh
  45. symlink-dot-packages.py
  46. update-manifest.go
  47. update_rust_crates.py
  48. visualize_module_tree.py
  49. zirconize.sed
  50. zirconize.sh
README.md

Scripts

This repository is for scripts useful when hacking on Fuchsia. This repository should contain scripts that perform tasks spanning multiple repositories. Scripts that only operate within a single repository should live in the relevant repository.

push-package.py

The push-package.py script pushes all of the files in a particular package. No checking is performed for incremental changes.

The sample command lines below can be used to build the “modular” package and then push it to the default device. This assumes you have already booted your device with a version of Fuchsia that contains the most recent version of all other packages.

fbuild apps/modular
scripts/push-package.py -o $FUCHSIA_BUILD_DIR packages/gn/modular

fpublish

fpublish from env.sh will take a package from the build and create a Fuchsia package manager package from a build package. It will then add the package to a local update respository which, by default, is put at ${FUCHSIA_BUILD_DIR}/amber-files. It will also add the package content files to the update repository and name these file after their Merkle Root. If a package name is supplied to fpublish, only that package will be processed. If no name is supplied, all the packages made by the build will be included.