Author: pekka.klarck
Date: Sun Mar 22 05:45:25 2009
New Revision: 1464

Modified:
   trunk/doc/userguide/src/ExecutingTestCases/BasicUsage.txt
   trunk/doc/userguide/src/ExecutingTestCases/OutputFiles.txt
   trunk/doc/userguide/src/ExtendingRobotFramework/CreatingTestLibraries.txt

Log:
Updated UG to mention that warnings are written to syslog

Modified: trunk/doc/userguide/src/ExecutingTestCases/BasicUsage.txt
==============================================================================
--- trunk/doc/userguide/src/ExecutingTestCases/BasicUsage.txt   (original)
+++ trunk/doc/userguide/src/ExecutingTestCases/BasicUsage.txt Sun Mar 22 05:45:25 2009
@@ -179,7 +179,6 @@
    Report:  /path/to/report.html
    Log:     /path/to/log.html

-
 The command line output is very limited, and separate output files are
 normally needed for investigating the test execution. As the example
 above shows, three output files are generated by default. The first
@@ -213,7 +212,6 @@
    255       Unexpected internal error.
    ========  ==========================================

-
 Return codes should always be easily available after the execution,
 which makes it easy to automatically determine the overall execution
 status. For example, in bash shell the return code is in special
@@ -222,6 +220,25 @@
 documentation for how to get the return code.


+Errors and warnings during execution
+''''''''''''''''''''''''''''''''''''
+
+It is possible that during the test execution there are some
+unexpected problems that are not actually related to test cases. There
+could, for example, be problems importing a test library or resource
+file or some executed keyword could be deprecated__. Depending on the
+severity such problems are either errors or warnings and they are
+written into the console (using the standard error stream), shown on a
+separate *Test Execution Errors* section in log files, and also written
+into Robot Framework's own `system log`_.
+
+.. tip:: It is possible to use `log level WARN`__ to write this kind
+         of warning messages from test libraries.
+
+__ `Deprecating keywords`_
+__ `Logging information`_
+
+
 Post-processing outputs
 ~~~~~~~~~~~~~~~~~~~~~~~

@@ -423,7 +440,6 @@
    pybot --argumentfile default_options.txt --name example my_tests.html
    pybot -A first.txt -A second.txt -A third.txt some_tests.tsv

-
 __ `Specifying test data to be executed`_


@@ -472,7 +488,6 @@
call pybot --variable BROWSER:IE --name IE --log none --report none --output out\ie.xml login call rebot --name Login --splitoutputs 1 --outputdir out --output login.xml out\fx.xml out\ie.xml

-
 In the next examples, JAR files under the :path:`lib` directory are
 put into CLASSPATH before starting the test execution. In these
 examples, start-up scripts require that paths to the executed test
@@ -491,7 +506,6 @@
    export CLASSPATH=$cp

    jybot --ouputdir /tmp/logs --splitoutputs 2 $*
-

Implementing this using Windows batch files is slightly more complicated. The difficult part is setting the variable containing the needed JARs inside a For

Modified: trunk/doc/userguide/src/ExecutingTestCases/OutputFiles.txt
==============================================================================
--- trunk/doc/userguide/src/ExecutingTestCases/OutputFiles.txt  (original)
+++ trunk/doc/userguide/src/ExecutingTestCases/OutputFiles.txt Sun Mar 22 05:45:25 2009
@@ -616,10 +616,12 @@
 that it contains a path to the selected file.

 A system log has the same `log levels`_ as a normal log file, with the
-exception that instead of :msg:`FAIL` it has the :msg:`ERROR` level. The
-threshold level to use can be altered using the
-:opt:`ROBOT_SYSLOG_LEVEL` environment variable.
-
+exception that instead of :msg:`FAIL` it has the :msg:`ERROR`
+level. The threshold level to use can be altered using the
+:opt:`ROBOT_SYSLOG_LEVEL` environment variable like shown in the
+example below.  Possible `unexpected errors and warnings`__ are
+written into the system log in addition to the console and the normal
+log file.

 .. sourcecode:: bash

@@ -630,3 +632,4 @@

    pybot --name Syslog_example path/to/tests

+__ `Errors and warnings during execution`_

Modified: trunk/doc/userguide/src/ExtendingRobotFramework/CreatingTestLibraries.txt
==============================================================================
--- trunk/doc/userguide/src/ExtendingRobotFramework/CreatingTestLibraries.txt (original) +++ trunk/doc/userguide/src/ExtendingRobotFramework/CreatingTestLibraries.txt Sun Mar 22 05:45:25 2009
@@ -653,8 +653,21 @@
 the message in the format :msg:`*LEVEL* Actual log message`, where
 :msg:`*LEVEL*` must be in the beginning of a line and :msg:`LEVEL` is
 one of the available logging levels :msg:`TRACE`, :msg:`DEBUG`,
-:msg:`INFO` and :msg:`WARN`.
+:msg:`INFO`, :msg:`WARN` and :msg:`HTML`.

+Warnings
+````````
+Starting from Robot Framework 2.1 messages with :msg:`WARN` level are
+automatically written into `the console and separate Test Execution
+Errors section`__ in log files. This makes warnings more visible than
+other messages and allows using them for reporting important but
+non-critical problems to users.
+
+__ `Errors and warnings during execution`_
+
+
+Logging HTML
+````````````
 Everything normally logged by the library will be converted into a
 format that can be safely represented as HTML. For example,
 :code:`<b>foo</b>` will be displayed in the log exactly like that and
@@ -662,10 +675,19 @@
 images and so on, they can use a special pseudo log level
 :msg:`HTML`. Robot Framework will write these messages directly into
 the log with the :msg:`INFO` level, so they can use any HTML syntax
-they want. However, this feature needs to be used with care, because
+they want. Notice that this feature needs to be used with care, because
 one badly placed :code:`</table>` tag can ruin the log file quite
 badly.

+Logging example
+```````````````
+In most cases, the :msg:`INFO` level is adequate. The levels below it,
+:msg:`DEBUG` and :msg:`TRACE`, are useful for writing debug information.
+These messages are normally not shown, but they can facilitate debugging
+possible problems in the library itself. The :msg:`WARN` level can
+be used to make messages more visible and :msg:`HTML` is useful if any
+kind of formatting is needed.
+
 The following examples clarify how logging with different levels
 works. Java programmers should regard the code :code:`print 'message'`
 as pseudocode meaning :code:`System.out.println("message");`.
@@ -681,7 +703,6 @@
    print '*HTML* This is <b>bold</b>.'
    print '*HTML* <a href="http://robotframework.org";>Robot Framework</a>'

-
 .. raw:: html

    <table class="messages">
@@ -721,13 +742,6 @@
<td class="msg"><a href="http://robotframework.org";>Robot Framework</a></td>
      </tr>
    </table>
-
-
-In most cases, the :msg:`INFO` level is adequate. The levels below it,
-:msg:`DEBUG` and :msg:`TRACE`, are useful for writing debug information.
-These messages are normally not shown, but they can facilitate debugging
-possible problems in the library itself. The :msg:`WARN` level can
-be used to make messages slightly more visible.


 Returning values

Reply via email to