<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html
  SYSTEM "about:legacy-compat">
<html xmlns:mml = "http://www.w3.org/1998/Math/MathML" lang = "en"><head><meta charset = "UTF-8"/><meta name = "copyright" content = "(C) Copyright 2020"/><meta name = "DC.rights.owner" content = "(C) Copyright 2020"/><meta name = "DC.type" content = "concept"/><meta name = "abstract" content = "Within this section, the logging functionality is described."/><meta name = "description" content = "Within this section, the logging functionality is described."/><meta name = "DC.format" content = "HTML5"/><meta name = "DC.identifier" content = "tso-c-usr-control-logging"/><meta name = "DC.language" content = "en"/><link rel = "stylesheet" type = "text/css" href = "../DSDocUI_XML34.css"/><title>Logging</title>
<script type = "text/javascript" src = "../DSDocUI_Highlight34.js">
  	/* */
  	</script></head><body onLoad = "highlightSearchTerms();" id = "tso-c-usr-control-logging">
<a name = "hj-top"> </a><table class = "table1" id = "table11"><tr><td><table class = "DocHeader"><tr><td class = "DocHeader1" colspan = "2"><h1>Logging</h1></td></tr><tr><td class = "DocHeader4" colspan = "2"/></tr><tr><td class = "DocHeader3" colspan = "2"><table class = "DocThemeIntro" id = "table12"><tr><td class = "Intro1Only"><p class = "header"><p class = "abstract">
<span class = "shortdesc">Within this section, the logging functionality is described.</span>

</p>
<p>This page discusses: </p><ul><li><a href = "#tso-c-usr-control-logging__tso-c-usr-control-logging-toscaOut" id = "toc_rg" title = "">TOSCA.OUT </a></li><li><a href = "#tso-c-usr-control-logging__tso-c-usr-control-logging-specLogFiles" id = "toc_rg" title = "">Special Logfiles</a></li><li><a href = "#tso-c-usr-control-logging__tso-c-usr-control-logging-gui" id = "toc_rg" title = "">Viewing TOSCA.OUT Using <span class = "ph">Tosca Structure.gui</span> </a></li><li><a href = "#tso-c-usr-control-logging__tso-c-usr-control-logging-changeLog" id = "toc_rg" title = "">Changing Logging Using the Command Shell</a></li><li><a href = "#tso-c-usr-control-logging__tso-c-usr-control-logging-tips" id = "toc_rg" title = "">Tips and Tricks Viewing TOSCA.OUT</a></li></ul>
</p></td></tr></table></td></tr></table>





<div class = "body conbody">

<p>Logging is always done to the command shell and to the file <code class = "ph codeph">&lt;jobname&gt;/TOSCA.OUT</code> file. The following levels can be used.</p>

<table class = "table"><caption/><colgroup><col style = "width:50%"/><col style = "width:50%"/></colgroup><thead class = "thead">
<tr class = "row">
<th class = "entry" id = "tso-c-usr-control-logging__entry__1"> Level </th>
<th class = "entry" id = "tso-c-usr-control-logging__entry__2"> Comment </th>
</tr>
</thead><tbody class = "tbody">
<tr class = "row">
<td class = "entry" headers = "tso-c-usr-control-logging__entry__1"><code class = "ph codeph">WARNING</code></td>
<td class = "entry" headers = "tso-c-usr-control-logging__entry__2">(Not recommended) Only WARNINGs and ERRORs are printed.</td>
</tr>
<tr class = "row">
<td class = "entry" headers = "tso-c-usr-control-logging__entry__1"><code class = "ph codeph">NOTICE</code></td>
<td class = "entry" headers = "tso-c-usr-control-logging__entry__2">Default output to <code class = "ph codeph">STDOUT</code>. Only the most important logging.</td>
</tr>
<tr class = "row">
<td class = "entry" headers = "tso-c-usr-control-logging__entry__1"><code class = "ph codeph">INFO</code></td>
<td class = "entry" headers = "tso-c-usr-control-logging__entry__2"> Default output to logfile TOSCA.OUT. </td>
</tr>
<tr class = "row">
<td class = "entry" headers = "tso-c-usr-control-logging__entry__1"><code class = "ph codeph">DEBUG</code></td>
<td class = "entry" headers = "tso-c-usr-control-logging__entry__2"> Very verbose output, mostly for support. </td>
</tr>
<tr class = "row">
<td class = "entry" headers = "tso-c-usr-control-logging__entry__1"><code class = "ph codeph">TRACE</code></td>
<td class = "entry" headers = "tso-c-usr-control-logging__entry__2">(Not recommended) Extremely verbose, major performance loss, only for developers.</td>
</tr>
</tbody></table>

<div class = "section" id = "tso-c-usr-control-logging__tso-c-usr-control-logging-toscaOut"><h2 class = "title sectiontitle">TOSCA.OUT </h2>

<p>The logfile TOSCA.OUT is the main logfile of <span class = "ph">Tosca Structure</span>. The logfile is at best viewed in a text editor that uses
        a fixed width font (for example, <code class = "ph codeph">Courier New</code>). The structure of the logging lines
        is:</p>

<pre class = "codeblock">
<code class = "ph codeph"> 
(&lt;log tag&gt;)[&lt;teime stamp&gt;|&lt;executable&gt;]&lt;message&gt;
</code>
</pre>

<p>Where:</p>
<table class = "table"><caption/><colgroup><col style = "width:50%"/><col style = "width:50%"/></colgroup><tbody class = "tbody">
<tr class = "row">
<td class = "entry"><code class = "ph codeph">&lt;log tag&gt;</code></td>
<td class = "entry"><code class = "ph codeph">=CRITICAL</code>
<p><code class = "ph codeph">=ERROR</code></p>
<p><code class = "ph codeph">=WARNING</code></p>
<p><code class = "ph codeph">=NOTICE</code></p>
<p><code class = "ph codeph">=DEBUG</code></p>
<p><code class = "ph codeph">=TRACE</code></p>
</td>
</tr>
<tr class = "row">
<td class = "entry"><code class = "ph codeph">&lt;time stamp&gt;</code></td>
<td class = "entry">Current time in format HH:MM:SS (Hours, Minutes, Seconds).</td>
</tr>
<tr class = "row">
<td class = "entry"><code class = "ph codeph">&lt;executable&gt;</code></td>
<td class = "entry">Name of the executable that wrote the logging message.</td>
</tr>
</tbody></table>

<table class = "table"><caption/><colgroup><col style = "width:50%"/><col style = "width:50%"/></colgroup><thead class = "thead">
<tr class = "row">
<th class = "entry" id = "tso-c-usr-control-logging__tso-c-usr-control-logging-toscaOut__entry__7"> Log-tags </th>
<th class = "entry" id = "tso-c-usr-control-logging__tso-c-usr-control-logging-toscaOut__entry__8"> Interpretation </th>
</tr>
</thead><tbody class = "tbody">
<tr class = "row">
<td class = "entry" headers = "tso-c-usr-control-logging__tso-c-usr-control-logging-toscaOut__entry__7"><code class = "ph codeph">CRITICAL</code></td>
<td class = "entry" headers = "tso-c-usr-control-logging__tso-c-usr-control-logging-toscaOut__entry__8">A critical error has occurred within the program. Contact support and explain.</td>
</tr>
<tr class = "row">
<td class = "entry" headers = "tso-c-usr-control-logging__tso-c-usr-control-logging-toscaOut__entry__7">
<code class = "ph codeph">ERROR</code>
</td>
<td class = "entry" headers = "tso-c-usr-control-logging__tso-c-usr-control-logging-toscaOut__entry__8">
An error has occurred during the execution of the optimization system and the user should
be able to make changes in the optimization definition or finite element model to
correct the problem. Take note of previous warnings.</td>
</tr>
<tr class = "row">
<td class = "entry" headers = "tso-c-usr-control-logging__tso-c-usr-control-logging-toscaOut__entry__7"><code class = "ph codeph">WARNING</code></td>
<td class = "entry" headers = "tso-c-usr-control-logging__tso-c-usr-control-logging-toscaOut__entry__8">A warning indicates that a problem has been identified, but the optimization
system continuous.</td>
</tr>
<tr class = "row">
<td class = "entry" headers = "tso-c-usr-control-logging__tso-c-usr-control-logging-toscaOut__entry__7"><code class = "ph codeph">NOTICE</code></td>
<td class = "entry" headers = "tso-c-usr-control-logging__tso-c-usr-control-logging-toscaOut__entry__8">Very general, important information (for example, <code class = "ph codeph">
Starting <span class = "ph">Tosca Structure</span>
optimization module - design cycle 6
</code>).</td>
</tr>
<tr class = "row">
<td class = "entry" headers = "tso-c-usr-control-logging__tso-c-usr-control-logging-toscaOut__entry__7"><code class = "ph codeph">INFO</code></td>
<td class = "entry" headers = "tso-c-usr-control-logging__tso-c-usr-control-logging-toscaOut__entry__8"> Information for the user. </td>
</tr>
<tr class = "row">
<td class = "entry" headers = "tso-c-usr-control-logging__tso-c-usr-control-logging-toscaOut__entry__7"><code class = "ph codeph">DEBUG</code></td>
<td class = "entry" headers = "tso-c-usr-control-logging__tso-c-usr-control-logging-toscaOut__entry__8">Very verbose output, mostly for support. Debug messages are not printed to
TOSCA.OUT using default settings. To enable debug output in TOSCA.OUT, add
<code class = "ph codeph">--loglevel debug</code> to the command line.</td>
</tr>
<tr class = "row">
<td class = "entry" headers = "tso-c-usr-control-logging__tso-c-usr-control-logging-toscaOut__entry__7"><code class = "ph codeph">TRACE</code></td>
<td class = "entry" headers = "tso-c-usr-control-logging__tso-c-usr-control-logging-toscaOut__entry__8">Extremely verbose output where a major performance loss is to be expected. Only for developers.</td>
</tr>
</tbody></table>



</div>


<div class = "section" id = "tso-c-usr-control-logging__tso-c-usr-control-logging-specLogFiles"><p><map name = "FPMap1"><area href = "#hj-top" title = "Back to Top" shape = "rect" coords = "416, 0, 435, 10"/></map><span class = "itemsprite"/></p><h2 class = "title sectiontitle">Special Logfiles</h2>

<p>In addition to TOSCA.OUT, a few other logfiles can be useful for troubleshooting special problems:</p>

<table class = "table"><caption/><colgroup><col style = "width:50%"/><col style = "width:50%"/></colgroup><thead class = "thead">
<tr class = "row">
<th class = "entry" id = "tso-c-usr-control-logging__tso-c-usr-control-logging-specLogFiles__entry__1"> Logfile </th>
<th class = "entry" id = "tso-c-usr-control-logging__tso-c-usr-control-logging-specLogFiles__entry__2"> Comment </th>
</tr>
</thead><tbody class = "tbody">
<tr class = "row">
<td class = "entry" headers = "tso-c-usr-control-logging__tso-c-usr-control-logging-specLogFiles__entry__1"><code class = "ph codeph">authorization.log</code></td>
<td class = "entry" headers = "tso-c-usr-control-logging__tso-c-usr-control-logging-specLogFiles__entry__2">Logging from <span class = "ph">Tosca Structure</span>’s authorization module tosca_server is written to
                this file. In case of licensing/authorization problems, see this file for
                details.</td>
</tr>
<tr class = "row">
<td class = "entry" headers = "tso-c-usr-control-logging__tso-c-usr-control-logging-specLogFiles__entry__1"><code class = "ph codeph">signal.log</code></td>
<td class = "entry" headers = "tso-c-usr-control-logging__tso-c-usr-control-logging-specLogFiles__entry__2">This log file has content only if you interrupt the optimization process with
                a <code class = "ph codeph">SIGNAL</code>, typically by pressing <code class = "ph codeph">Ctrl</code> +
                  <code class = "ph codeph">C</code> in the command prompt. <span class = "ph">Tosca Structure</span> will then kill the running subprocess, optionally
                using a script defined by the setting $killscripts. See <code class = "ph codeph">CONFIG</code> for
                details.</td>
</tr>
<tr class = "row">
<td class = "entry" headers = "tso-c-usr-control-logging__tso-c-usr-control-logging-specLogFiles__entry__1"><code class = "ph codeph">TOSCA_post.OUT</code></td>
<td class = "entry" headers = "tso-c-usr-control-logging__tso-c-usr-control-logging-specLogFiles__entry__2">This logfile is generated when using the command line flags -- smooth
or -- report. This enables the user to generate <code class = "ph codeph">SMOOTH</code> or
<code class = "ph codeph">REPORT</code> results during a running optimization.</td>
</tr>
</tbody></table>

</div>


<div class = "section" id = "tso-c-usr-control-logging__tso-c-usr-control-logging-gui"><p><map name = "FPMap1"><area href = "#hj-top" title = "Back to Top" shape = "rect" coords = "416, 0, 435, 10"/></map><span class = "itemsprite"/></p><h2 class = "title sectiontitle">Viewing TOSCA.OUT Using <span class = "ph">Tosca Structure.gui</span> </h2>

<ol class = "ol">
<li class = "li">To view TOSCA.OUT in <span class = "ph">Tosca Structure.gui</span>, select 
<span class = "ph">Tosca Structure</span> 
 as <span class = "ph uicontrol">Module</span>.</li>
<li class = "li">Select <span class = "ph uicontrol">View TOSCA.OUT</span>.</li>
</ol>
<p>This procedure and also the request of logging on debug level are shown in the following figure:</p>

<table class = "table"><caption/><colgroup><col/></colgroup><tbody class = "tbody">
<tr class = "row">
<td class = "entry">
<br/><img class = "image" src = "../TsoUserImages/usr_control_4.png" width = "450"/><br/>
</td>
</tr>
</tbody></table>

<p>To add debugging output in TOSCA.OUT, activate the check-box
<span class = "ph uicontrol">Debug Output</span>.</p>
</div>


<div class = "section" id = "tso-c-usr-control-logging__tso-c-usr-control-logging-changeLog"><p><map name = "FPMap1"><area href = "#hj-top" title = "Back to Top" shape = "rect" coords = "416, 0, 435, 10"/></map><span class = "itemsprite"/></p><h2 class = "title sectiontitle">Changing Logging Using the Command Shell</h2>


<p>To change loglevel in TOSCA.OUT, use the following command line parameter:</p>

<pre class = "codeblock">
<code class = "ph codeph">
tosca --loglevel &lt;new_level&gt; ...
</code>
</pre>

<p>To increase the amount of output to the command shell, set the parameter:</p>

<pre class = "codeblock">
<code class = "ph codeph">
tosca --loglevel_stdout &lt;new_loglevel&gt;
</code>
</pre>

<table class = "Remark" id = "table132"><tr><td class = "Remark"><span class = "run-in.important">Important:
				</span><span class = "notecontent">
<p>Note that <code class = "ph codeph">--loglevel</code> must be equal or more verbose than <code class = "ph codeph">--loglevel_stdout</code>.
To separate <code class = "ph codeph">stderr</code> from <code class = "ph codeph">stdout</code>:</p>
<pre class = "codeblock">
<code class = "ph codeph">
tosca --stderr
</code>
</pre>
</span></td></tr></table>


<p>The following example demonstrates how to increase loglevel to <code class = "ph codeph">INFO</code> on the command shell and <code class = "ph codeph">DEBUG</code> output into the logfile TOSCA.OUT:</p>

<pre class = "codeblock">
<code class = "ph codeph">
tosca --loglevel_stdout INFO --loglevel DEBUG ...
</code>
</pre>

</div>


<div class = "section" id = "tso-c-usr-control-logging__tso-c-usr-control-logging-tips"><p><map name = "FPMap1"><area href = "#hj-top" title = "Back to Top" shape = "rect" coords = "416, 0, 435, 10"/></map><span class = "itemsprite"/></p><h2 class = "title sectiontitle">Tips and Tricks Viewing TOSCA.OUT</h2>


<table class = "table"><caption/><colgroup><col style = "width:50%"/><col style = "width:50%"/></colgroup><thead class = "thead">
<tr class = "row">
<th class = "entry" id = "tso-c-usr-control-logging__tso-c-usr-control-logging-tips__entry__1"> Topic </th>
<th class = "entry" id = "tso-c-usr-control-logging__tso-c-usr-control-logging-tips__entry__2"> Tips and Tricks </th>
</tr>
</thead><tbody class = "tbody">
<tr class = "row">
<td class = "entry" headers = "tso-c-usr-control-logging__tso-c-usr-control-logging-tips__entry__1"> Finding errors </td>
<td class = "entry" headers = "tso-c-usr-control-logging__tso-c-usr-control-logging-tips__entry__2">Search for the word <code class = "ph codeph">(ERROR</code> and make sure that your editor has not activated
regular expressions. This search should always be done from the beginning
of the logfile because the first printed error message is usually of greatest
importance.</td>
</tr>
<tr class = "row">
<td class = "entry" headers = "tso-c-usr-control-logging__tso-c-usr-control-logging-tips__entry__1"> Runtime </td>
<td class = "entry" headers = "tso-c-usr-control-logging__tso-c-usr-control-logging-tips__entry__2">You can view the runtime or elapsed time of each executable in a <span class = "ph">Tosca Structure</span> run by searching for <code class = "ph codeph">Elapsed</code>:
<pre class = "codeblock">
<code class = "ph codeph">
(INFO ) [13:20:22|tosca_perl] Elapsed time of fem_include
: 00:00:00 - Actual time: 13:20:22
(INFO ) [13:20:24|tosca_perl] Elapsed time of fem2onf
: 00:00:02 - Actual time: 13:20:24
(INFO ) [13:20:29|tosca_perl] Elapsed time of tosca_prep
: 00:00:05 - Actual time: 13:20:29
(INFO ) [13:20:31|tosca_perl] Elapsed time of fem_modif
: 00:00:02 - Actual time: 13:20:31
(INFO ) [13:21:57|tosca_perl] Elapsed time of abaqus
: 00:01:26 - Actual time: 13:21:57
(INFO ) [13:21:59|tosca_perl] Elapsed time of odb2vtm
: 00:00:02 - Actual time: 13:21:59
(INFO ) [13:22:03|tosca_perl] Elapsed time of tosca_opt
: 00:00:04 - Actual time: 13:22:03
</code>
</pre>

The time format is in HH:MM:SS. In this case, we see that <span class = "ph">Abaqus</span> has run 1
minute and 26 seconds, whereas the optimization module, <code class = "ph codeph">tosca_opt</code>, only
spent 4 seconds.
</td>
</tr>
<tr class = "row">
<td class = "entry" headers = "tso-c-usr-control-logging__tso-c-usr-control-logging-tips__entry__1"> How is my FE-solver called? </td>
<td class = "entry" headers = "tso-c-usr-control-logging__tso-c-usr-control-logging-tips__entry__2">All calls of executables are written in the logfile TOSCA.OUT. To see how a
                certain executable (for example, your FE-solver) is called, search the file for
                  <code class = "ph codeph">Calling</code>. In the search results you will also see the FE-solver
                call; for example: <pre class = "codeblock">
<code class = "ph codeph">
(INFO ) [13:29:59|tosca_perl] Calling(17048): "/store2/
app/bin/abaqus" job=shapeV2 analysis interactive --version 6.10-3
</code>
</pre> The number in the parenthesis <code class = "ph codeph">Calling(&lt;pid&gt;)</code> is the
                process identification number, PID.</td>
</tr>
<tr class = "row">
<td class = "entry" headers = "tso-c-usr-control-logging__tso-c-usr-control-logging-tips__entry__1"> Debug output from only one executable </td>
<td class = "entry" headers = "tso-c-usr-control-logging__tso-c-usr-control-logging-tips__entry__2">Using loglevel debug is very verbose and this might be annoying if only logging
from one single executable is of interest. There is a way of getting
debugging information only for certain executables:
<ul class = "ul">
<li class = "li">
Use the driver configuration, see <code class = "ph codeph">DRIVER</code> command:
<pre class = "codeblock">
<code class = "ph codeph">
DRIVER
  driver.Modules[ ToscaModules.TOSCA_OPT ].LogLevel = LogLevels.DEBUG
END_
</code>
</pre>

</li>
</ul>

</td>
</tr>
</tbody></table>
</div>


</div>


</td></tr></table><script type = "text/javascript" src = "../DSDocUI_Bottom34.js">/* */</script></body>
</html>
