<p>That's <a href="http://buildwithcraft.com/docs/config-settings#devMode" rel="nofollow">devMode</a> output (usually gets sent to your browser's console).</p>

<p>If you want to run your plugin in devMode, add this to your plugin's <code>init()</code> method:</p>

<pre><code>craft()-&gt;log-&gt;removeRoute('WebLogRoute');
craft()-&gt;log-&gt;removeRoute('ProfileLogRoute');
</code></pre>

<p>And it will get rid of the extra output.</p>

CC BY-SA 3.0
2014-10-04T21:48:48.517Z
To get rid of this without the init() changes can i change the devMode to false for this environment?
mbalparda
CC BY-SA 3.0
2014-10-04T22:59:49.340Z
That'll work, too.
Brad Bell
CC BY-SA 3.0
2014-10-03T21:17:29.620Z
2014-10-03T21:17:29.620Z
Brad Bell
<p>I created a cron for an import and i pointed it to a Craft controller. Everything is working as expected but im getting a strange output after the die() call. It is something starting with </p>

<pre><code>Import finished&lt;script type="text/javascript"&gt;

/*&lt;![CDATA[*/
if (typeof(console) == 'object')
{
        console.groupCollapsed("Application Log");

                console.groupCollapsed("GET info");
        console.log("[20:51:21.230][info][application]\n");
        console.groupEnd();
        console.groupCollapsed("Info om informasjonskapsel");
        console.log("[20:51:21.230][info][application]\n$_GET=array (\n  \'p\' =&gt; \'actions/garp/cron/changeStock\',\n)\n\n");
        console.groupEnd();
        console.groupCollapsed("SERVER info");
        console.log("[20:51:21.230][info][application]\n$_SERVER=array (\n  \'REDIRECT_HTTPS\' =&gt; \'on\',\n  \'REDIRECT_SSL_TLS_SNI\' =&gt; \'staging.alfa.rrdev.co\',\n  \'REDIRECT_STATUS\' =&gt; \'200\',\n  \'HTTPS\' =&gt; \'on\',\n  \'SSL_TLS_SNI\' =&gt; \'staging.alfa.rrdev.co\',\n  \'HTTP_USER_AGENT\' =&gt; \'Wget/1.15 (linux-gnu)\',\n  \'HTTP_ACCEPT\' =&gt; \'*/*\',\n  \'HTTP_HOST\' =&gt; \'staging.alfa.rrdev.co\',\n  \'HTTP_CONNECTION\' =&gt; \'Keep-Alive\',\n  \'PATH\' =&gt; \'/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\',\n  \'SERVER_SIGNATURE\' =&gt; \'&lt;address&gt;Apache/2.4.7 (Ubuntu) Server at staging.alfa.rrdev.co Port 443&lt;\/address&gt;\n\',\n  \'SERVER_SOFTWARE\' =&gt; \'Apache/2.4.7 (Ubuntu)\',\n  \'SERVER_NAME\' =&gt; \'staging.alfa.rrdev.co\',\n  \'SERVER_ADDR\' =&gt; \'172.31.34.161\',\n  \'SERVER_PORT\' =&gt; \'443\',\n  \'REMOTE_ADDR\' =&gt; \'54.76.237.6\',\n  \'DOCUMENT_ROOT\' =&gt; \'/var/www/alfa/public\',\n  \'REQUEST_SCHEME\' =&gt; \'https\',\n  \'CONTEXT_PREFIX\' =&gt; \'\',\n  \'CONTEXT_DOCUMENT_ROOT\' =&gt; \'/var/www/alfa/public\',\n  \'SERVER_ADMIN\' =&gt; \'[no address given]\',\n  \'SCRIPT_FILENAME\' =&gt; \'/var/www/alfa/public/index.php\',\n  \'REMOTE_PORT\' =&gt; \'51921\',\n  \'REDIRECT_QUERY_STRING\' =&gt; \'p=actions/garp/cron/changeStock\',\n  \'REDIRECT_URL\' =&gt; \'/actions/garp/cron/changeStock\',\n  \'GATEWAY_INTERFACE\' =&gt; \'CGI/1.1\',\n  \'SERVER_PROTOCOL\' =&gt; \'HTTP/1.1\',\n  \'REQUEST_METHOD\' =&gt; \'GET\',\n  \'QUERY_STRING\' =&gt; \'p=actions/garp/cron/changeStock\',\n  \'REQUEST_URI\' =&gt; \'/actions/garp/cron/changeStock\',\n  \'SCRIPT_NAME\' =&gt; \'/index.php\',\n  \'PHP_SELF\' =&gt; \'/index.php\',\n  \'REQUEST_TIME_FLOAT\' =&gt; 1412369481.227,\n  \'REQUEST_TIME\' =&gt; 1412369481,\n)");
        console.groupEnd();
</code></pre>

<p>Code (actionChangeStock) ends with </p>

<pre><code>    if (craft()-&gt;httpSession-&gt;get('garpfailed')) {
        echo "Import failed";
    } else {
        echo "Import finished";
    }
    die();
}
</code></pre>

<p>and cron call is </p>

<pre><code>wget -O /home/ubuntu/cronStock https://domain.com/actions/garp/cron/changeStock
</code></pre>

<p>Is this expected? Im getting a 9mb file when i should get only Import failed or Import finished.</p>

<plugin-development>
Data after die()
# Data after die()

(Asked by: username_0 on 2014-10-03)

I created a cron for an import and i pointed it to a Craft controller. Everything is working as expected but im getting a strange output after the die() call. It is something starting with 
Import finished

**Tags:** plugin-development

---

## 1 answers

### Answer by username_1 on 2014-10-03. Score: 2 | Accepted answer

That's devMode output (usually gets sent to your browser's console).
If you want to run your plugin in devMode, add this to your plugin's init() method:
craft()->log->removeRoute('WebLogRoute');
craft()->log->removeRoute('ProfileLogRoute');

And it will get rid of the extra output.

> **Comments:**
> **username_0**: To get rid of this without the init() changes can i change the devMode to false for this environment?  
> **username_1**: That'll work, too.  

---

