log-files.dita 4.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
  3. <!--This file is part of the DITA Open Toolkit project. See the accompanying LICENSE.md file for applicable licenses.-->
  4. <concept id="loghandling" xml:lang="en-US">
  5. <title>Log files</title>
  6. <shortdesc>When you run the DITA-OT, key information is logged on the screen. This information can also be written to
  7. a log file. If you encounter a problem, you can analyze this information to determine the source of the problem and
  8. then take action to resolve it.</shortdesc>
  9. <conbody>
  10. <p>The logging behavior varies depending on whether you use the <cmdname>dita</cmdname> command, DITA-OT
  11. command-line tool, or Ant to invoke a toolkit build.<dl>
  12. <dlentry>
  13. <dt><cmdname>dita</cmdname> command</dt>
  14. <dd>By default, only warning and error messages are written to the screen. If you use the
  15. <parmname>-v</parmname> option, logging will be more verbose and informative messages are also written
  16. out. The <parmname>-l</parmname> option can be used to write the log messages into a file.</dd>
  17. </dlentry>
  18. <dlentry>
  19. <dt>Ant</dt>
  20. <dd>By default, status information is written to the screen. If you issue the <parmname>-l</parmname>
  21. parameter, the build runs silently and the information is written to a log file with the name and location
  22. that you specified. (You also can use other Ant loggers; see the Ant documentation for more
  23. information.)</dd>
  24. </dlentry>
  25. <!--<dlentry importance="deprecated">
  26. <dt>Command-line tool</dt>
  27. <dd>Status information is written to the screen and the log file. The log file name contains the input file
  28. name and transformation type; by default, it is located in the output directory. If you issue the
  29. <parmname>/logdir</parmname> parameter, you can specify a different location for where the log file is
  30. written.</dd>
  31. </dlentry>-->
  32. </dl></p>
  33. <!--<section><title>Analyze messages on the screen</title><p>During the building process, some information or messages
  34. occur on the screen to tell you about the status, warnings, errors, or fatal errors. You need to analyze the
  35. messages to solve the problems. <ul>
  36. <li>If the build succeeded with some warning messages on the screen, it means that there are something
  37. incorrect within the user input parameters or source DITA files; but you can still get the correct
  38. output.</li>
  39. <li>If the build succeeded with some error messages on the screen, it means that there are something incorrect
  40. within the user input parameters or source DITA files; the output maybe not correct.</li>
  41. <li>If the build failed with fatal error message on the screen, it means that there are something illegal or
  42. invalid within the user input parameters or source DITA files; you may get no output, or wrong output.</li>
  43. </ul>
  44. </p></section>-->
  45. <!--<section><title>Analyze messages in the log file</title><p>A log file in plain text format is generated in the log
  46. directory, which has a name combined with both input file name and transformation type. You can open it and find more
  47. detailed information, which are helpful for solving problems. You can use the same way introduced above to
  48. analyze the messages and solve the problems.</p><p>The log directory can be specified by:</p><ul>
  49. <li>using Ant, with argument <codeph>-logfile=<userinput>log-file</userinput></codeph></li>
  50. <li>using command-line tool, the parameter <codeph>/logdir:<userinput>log-dir</userinput></codeph>.</li>
  51. </ul></section>-->
  52. <!--<section><title>Turn on debug mode</title><p>Under debug mode, diagnostic information, such as: environment
  53. variables, stack trace, will be logged into the log file. These information can help the user or developer to go
  54. deep into the problems and find the root cause.</p><p>By default, the debug mode is disabled. To turn on the
  55. debug mode on, you need to follow the usage below: <ul>
  56. <li>Append <codeph>-v</codeph> and <codeph>-Dargs.debug=yes</codeph> in Ant command.</li>
  57. <li>Append <codeph>/d</codeph> or <codeph>/debug</codeph> in command-line tool.</li>
  58. </ul></p></section>-->
  59. </conbody>
  60. </concept>