* scicos_log() support options parameters to retrieve model statistics.
[scilab.git] / scilab / modules / xcos / help / en_US / scilab_utilities_functions / scicos_log.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="scicos_log">
3     <refnamediv>
4         <refname>scicos_log</refname>
5         <refpurpose>Logger utility for scicos</refpurpose>
6     </refnamediv>
7     <refsynopsisdiv>
8         <title>Syntax</title>
9         <synopsis>
10             log=scicos_log(log);
11             log=scicos_log(log, msg);
12             refCounters=scicos_log("refCounters");
13         </synopsis>
14     </refsynopsisdiv>
15     <refsection>
16         <title>Arguments</title>
17         <variablelist>
18             <varlistentry>
19                 <term>log</term>
20                 <listitem>
21                     <para>String, logger value. The supported log modifiers are : "FATAL", "ERROR", "WARNING", "INFO", "DEBUG", "TRACE"</para>
22                 </listitem>
23             </varlistentry>
24             <varlistentry>
25                 <term>msg</term>
26                 <listitem>
27                     <para>
28                         String, the message to log.
29                     </para>
30                 </listitem>
31             </varlistentry>
32             <varlistentry>
33                 <term>refCounters</term>
34                 <listitem>
35                     <para>a double vector, with a [uid, kind, reference counter] line per object.</para>
36                 </listitem>
37             </varlistentry>
38         </variablelist>
39     </refsection>
40     <refsection>
41         <title>Description</title>
42         <para>
43             This function implements a logger for <literal>scicos</literal> operation. This function lets the user choose the right level of information to print while loading a model, compiling and simulating it.
44         </para>
45         <para>
46             It is also used to produce statistics or global analysis for specific flags. For exemple, passing <pre>"refCounters"</pre> will return uid, kind and reference count of all objects.
47         </para>
48     </refsection>
49     <refsection>
50         <title>Examples</title>
51         <programlisting role="example"><![CDATA[
52 scicos_log("TRACE"),
53 scicos_log("TRACE", "this is a trace message");
54  ]]></programlisting>
55         <programlisting role="example"><![CDATA[
56 loadXcosLibs();
57 scicos_log("refCounters")
58 b = scicos_block();
59 scicos_log("refCounters")
60  ]]></programlisting>
61     </refsection>
62     <refsection role="see also">
63         <title>See also</title>
64         <simplelist type="inline">
65             <member>
66                 <link linkend="scicos_debug">scicos_debug</link>
67             </member>
68             <member>
69                 <link linkend="scicos_block">scicos_block</link>
70             </member>
71             <member>
72                 <link linkend="loadXcosLibs">loadXcosLibs</link>
73             </member>
74         </simplelist>
75     </refsection>
76 </refentry>
77