You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.4 KiB

9 years ago
9 years ago
9 years ago
9 years ago
  1. ## Goaccess
  2. To get live statistics in [goaccess](http://goaccess.io/), first create this config file at `~/.goaccessrc`:
  3. ```
  4. time-format %T
  5. date-format %d/%b/%Y
  6. log-format %h %^[%d:%t %^] "%r" %s %b "%R" "%u"
  7. ```
  8. Then, start the server, outputting `combined` format logs to disk:
  9. ```sh
  10. $ ws -f combined > web.log
  11. ```
  12. In a separate tab, point goaccess at `web.log` and it will display statistics in real time:
  13. ```
  14. $ goaccess -p ~/.goaccessrc -f web.log
  15. ```
  16. ## Logstalgia
  17. local-web-server is compatible with [logstalgia](http://code.google.com/p/logstalgia/).
  18. ### Install Logstalgia
  19. On MacOSX, install with [homebrew](http://brew.sh):
  20. ```sh
  21. $ brew install logstalgia
  22. ```
  23. Alternatively, [download a release for your system from github](https://github.com/acaudwell/Logstalgia/releases/latest).
  24. Then pipe the `logstalgia` output format directly into logstalgia for real-time visualisation:
  25. ```sh
  26. $ ws -f logstalgia | logstalgia -
  27. ```
  28. ![local-web-server with logstalgia](https://raw.githubusercontent.com/75lb/local-web-server/master/doc/img/logstagia.gif)
  29. ## glTail
  30. To use with [glTail](http://www.fudgie.org), write your log to disk using the "default" format:
  31. ```sh
  32. $ ws -f default > web.log
  33. ```
  34. Then specify this file in your glTail config:
  35. ```yaml
  36. servers:
  37. dev:
  38. host: localhost
  39. source: local
  40. files: /Users/Lloyd/Documents/MySite/web.log
  41. parser: apache
  42. color: 0.2, 0.2, 1.0, 1.0
  43. ```