logFiles.html 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. {
  2. title: 'Log Files',
  3. crumbs: [
  4. { "User's Guide": '../users/' },
  5. ],
  6. }
  7. <h1>Log Files</h1>
  8. <p>GoAhead provides detailed logging regarding client accesses and the operation of GoAhead.
  9. The log records the essential GoAhead configuration, details of denied requests, and other trace
  10. and error information. The log can also record request and response headers and other request details.</p>
  11. <a name="sample"></a>
  12. <h2>Sample Output</h2>
  13. <p>Here is some sample log output.</p>
  14. <pre class="ui code segment">
  15. goahead: 2: Configuration for Embedthis GoAhead
  16. goahead: 2: ---------------------------------------------
  17. goahead: 2: Version: 3.0.0-0
  18. goahead: 2: BuildType: Debug
  19. goahead: 2: CPU: x64
  20. goahead: 2: OS: macosx
  21. goahead: 2: Host: 10.0.0.102
  22. goahead: 2: Directory: /Users/mob/git/goahead
  23. goahead: 2: Configure: me configure
  24. goahead: 2: ---------------------------------------------
  25. goahead: 2: Started http://*:80
  26. goahead: 2: Started https://*:443
  27. </pre>
  28. <p>Each line in the error log is prefixed with source information. This follows the format:</p>
  29. <pre class="ui code segment">
  30. program:logLevel
  31. </pre>
  32. <p>The log level is the verbosity level assigned to the trace information by GoAhead.</p>
  33. <a name="logs"></a>
  34. <h2>Log Files</h2>
  35. <p>The default location of the log file is specified at build time via the command:
  36. <pre class="ui code segment">./configure --set trace="file:level"</pre>
  37. <p>The log filename can be set to "stdout" or "stderr". The debug level specifies the desired trace verbosity.
  38. Level 0 is the least verbose and level 9 is the most verbose.</p>
  39. <p>Configure will defines a <em>ME_TRACE</em> definition in the <em>me.h</em> configuration header that is used
  40. to set the default log location. After building, the trace can be redirected via a <em>goahead</em> command line option.
  41. <h3>Command Line Log Option</h3>
  42. <p>You may specify the error log file and log level via the GoAhead command line <em>--log</em> option. If you
  43. invoke GoAhead with a <em>--log file:level</em>. command line option, it will override the build time
  44. defaults.</p>