<!--  vim: set sw=2 sts=2 et ft=docbk:

  Part of the A-A-P recipe executive: Debugging

  Copyright (C) 2002-2003 Stichting NLnet Labs
  Permission to copy and use this file is specified in the file COPYING.
  If this file is missing you can find it here: http://www.a-a-p.org/COPYING

-->

<para>

The log file shows what happened while A-A-P was executing.  Often you can
figure out what went wrong by looking at the messages.
</para>
<para>
The log file is named "AAPDIR/log".
It is located in the directory of the main recipe.  If you executed aap again
and now want to see the previous log, it is named "AAPDIR/log1".  Older logs
are "AAPDIR/log2", "AAPDIR/log3", etc.  This goes up to
"AAPDIR/log9".
</para>

<bridgehead>Messages</bridgehead>

<para>
  The kind of messages given can be changed with the
  <link linkend="var-message">MESSAGE</link> variable.  It is a
comma separated list of message types for which the message is displayed.
Other messages are still written in the log file.
<informaltable frame='none'>
  <tgroup cols='2'>
    <colspec colwidth="150"/>
    <thead>
      <row>
        <entry>name</entry>
        <entry>display message for</entry>
      </row>
    </thead>
    <tbody>
      <row>
        <entry>all</entry>
        <entry>everything</entry>
      </row>
      <row>
        <entry>error</entry>
        <entry>errors (&Aap; cannot continue)</entry>
      </row>
      <row>
        <entry>warning</entry>
        <entry>warnings (things that are wrong but &Aap; can still continue)</entry>
      </row>
      <row>
        <entry>note</entry>
        <entry>notes (warnings about things that are probably OK)</entry>
      </row>
      <row>
        <entry>depend</entry>
        <entry>dependencies, the reasoning about what to build</entry>
      </row>
      <row>
        <entry>info</entry>
        <entry>general info (file copy/delete, up/downloads)</entry>
      </row>
      <row>
        <entry>extra</entry>
        <entry>extra info (why something was done)</entry>
      </row>
      <row>
        <entry>system</entry>
        <entry>system (shell) commands that are executed</entry>
      </row>
      <row>
        <entry>result</entry>
        <entry>the result of system (shell) commands</entry>
      </row>
      <row>
        <entry>changedir</entry>
        <entry>changing directories</entry>
      </row>
    </tbody>
  </tgroup>
</informaltable>
</para>

<para>
The command line arguments "-v" and "-s" can be used to make the most often
used selections:

<informaltable frame='none'>
  <tgroup cols='2'>
    <colspec colwidth="150"/>
    <thead>
      <row>
        <entry>&Aap; argument</entry>
        <entry>$MESSAGE value</entry>
      </row>
    </thead>
    <tbody>
      <row>
        <entry>(nothing)</entry>
        <entry>error,warning,system,info</entry>
      </row>
      <row>
        <entry><link linkend="option-verbose">-v</link></entry>
        <entry>all</entry>
      </row>
      <row>
        <entry><link linkend="option-verbose">--verbose</link></entry>
        <entry>all</entry>
      </row>
      <row>
        <entry><link linkend="option-silent">-s</link></entry>
        <entry>error</entry>
      </row>
      <row>
        <entry><link linkend="option-silent">--silent</link></entry>
        <entry>error</entry>
      </row>
    </tbody>
  </tgroup>
</informaltable>
</para>

<para>
Other values can be assigned at the command line.  For example, to only see
error and dependency messages:

<literallayout>        aap MESSAGE=error,depend  (other arguments)
</literallayout>
</para>

<para>
Don't forget that excluding "error" means that no error messages are displayed!
</para>

<para>
No matter what messages are displayed, all messages are written in the log
file.  This can be used afterwards to see what actually happened.
</para>
