<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to enable javascript logging (Alfresco community 5.2) in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/how-to-enable-javascript-logging-alfresco-community-5-2/m-p/132164#M35642</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to log a message from a javascript file: my-tasks.js. I'm using the following code inside an Alfresco Share amp:&lt;/P&gt;&lt;PRE&gt;Alfresco.logger.warn("Kenneth Venken has succesfully logged a warning");&lt;/PRE&gt;&lt;P&gt;I've enabled client-debug in share-config.xml (Debug menu was added to main menu) but nothing is shown in my console or in any other log file. I've also set the log4j properties to:&lt;/P&gt;&lt;PRE&gt;# Web Framework
log4j.logger.org.springframework.extensions.webscripts=info
log4j.logger.org.springframework.extensions.webscripts.ScriptLogger=debug
log4j.logger.org.springframework.extensions.webscripts.ScriptDebugger=info&lt;/PRE&gt;&lt;P&gt;Where are these Alfresco.logger messages logged and what should I do to enable them?&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
    <pubDate>Tue, 31 Aug 2021 11:03:21 GMT</pubDate>
    <dc:creator>kenneth-venken</dc:creator>
    <dc:date>2021-08-31T11:03:21Z</dc:date>
    <item>
      <title>How to enable javascript logging (Alfresco community 5.2)</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-enable-javascript-logging-alfresco-community-5-2/m-p/132164#M35642</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to log a message from a javascript file: my-tasks.js. I'm using the following code inside an Alfresco Share amp:&lt;/P&gt;&lt;PRE&gt;Alfresco.logger.warn("Kenneth Venken has succesfully logged a warning");&lt;/PRE&gt;&lt;P&gt;I've enabled client-debug in share-config.xml (Debug menu was added to main menu) but nothing is shown in my console or in any other log file. I've also set the log4j properties to:&lt;/P&gt;&lt;PRE&gt;# Web Framework
log4j.logger.org.springframework.extensions.webscripts=info
log4j.logger.org.springframework.extensions.webscripts.ScriptLogger=debug
log4j.logger.org.springframework.extensions.webscripts.ScriptDebugger=info&lt;/PRE&gt;&lt;P&gt;Where are these Alfresco.logger messages logged and what should I do to enable them?&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Tue, 31 Aug 2021 11:03:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-enable-javascript-logging-alfresco-community-5-2/m-p/132164#M35642</guid>
      <dc:creator>kenneth-venken</dc:creator>
      <dc:date>2021-08-31T11:03:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to enable javascript logging (Alfresco community 5.2)</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-enable-javascript-logging-alfresco-community-5-2/m-p/132165#M35643</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;As a workaround you can use:&lt;/P&gt;&lt;PRE&gt;logger.system.out("Your message");&lt;/PRE&gt;&lt;P&gt;You can see your message in tomcat/logs/catalina.out or if you are using Alfresco as a service, you will be able to find it under alfrescotomcat-stdout.log&lt;/P&gt;&lt;P&gt;Note: client-debug must be enabled&lt;/P&gt;&lt;P&gt;Or you would have to configure your log4j properties using&amp;nbsp;&lt;A href="https://github.com/OrderOfTheBee/ootbee-support-tools" target="_blank" rel="noopener nofollow noreferrer"&gt; OOTBee Support Tools console&lt;/A&gt; add-on (even you have a &lt;A href="https://community.venzia.es/alfresco-javascript-console/" target="_blank" rel="noopener nofollow noreferrer"&gt;javasript console&lt;/A&gt; that you can use too).&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2021 11:44:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-enable-javascript-logging-alfresco-community-5-2/m-p/132165#M35643</guid>
      <dc:creator>cristinamr</dc:creator>
      <dc:date>2021-08-31T11:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to enable javascript logging (Alfresco community 5.2)</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-enable-javascript-logging-alfresco-community-5-2/m-p/132166#M35644</link>
      <description>&lt;P&gt;Ok, so i don't see my log message showing up in tomcat/logs/catalina.2021-09-01.log or tomcat/logs/alfrescotomcat-stdout.2021-09-01.log&amp;nbsp; (Nor is there a catalina.out file and i have client-debug enabled.)&lt;/P&gt;&lt;P&gt;Using logger.system.out('My message') results in a console error message: logger is undefined.&lt;/P&gt;&lt;P&gt;If I type Alfresco.logger.isDebugEnabled() in the console it returns false. Is this an indication that some settings are wrong for debug to work? I have no idea what to try next, any help is much appreciated.&lt;/P&gt;&lt;P&gt;If i go to /share/page/api/javascript/debugger it says that alfresco javascript debugger is currently disabled. If i press the enable button i get a 500 -internal error.&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Wed, 01 Sep 2021 08:47:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-enable-javascript-logging-alfresco-community-5-2/m-p/132166#M35644</guid>
      <dc:creator>kenneth-venken</dc:creator>
      <dc:date>2021-09-01T08:47:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to enable javascript logging (Alfresco community 5.2)</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-enable-javascript-logging-alfresco-community-5-2/m-p/132167#M35645</link>
      <description>&lt;P&gt;I have the feeling that the problem is were are you "enabling" the debug. Could you please give us the path of the files that you modified and which lines did you added?&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 09:37:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-enable-javascript-logging-alfresco-community-5-2/m-p/132167#M35645</guid>
      <dc:creator>cristinamr</dc:creator>
      <dc:date>2021-09-01T09:37:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to enable javascript logging (Alfresco community 5.2)</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-enable-javascript-logging-alfresco-community-5-2/m-p/132168#M35646</link>
      <description>&lt;P&gt;C:\alfresco-community\tomcat\webapps\share\WEB-INF\classes\alfresco\share-config.xml:&lt;/P&gt;&lt;PRE&gt;   &amp;lt;!-- Global config section --&amp;gt;
   &amp;lt;config&amp;gt;
      &amp;lt;flags&amp;gt;
         &amp;lt;!--
            Developer debugging setting to turn on DEBUG mode for client scripts in the browser
         --&amp;gt;
         &amp;lt;client-debug&amp;gt;true&amp;lt;/client-debug&amp;gt;
         &amp;lt;!--
            LOGGING can always be toggled at runtime when in DEBUG mode (Ctrl, Ctrl, Shift, Shift).
            This flag automatically activates logging on page load.
         --&amp;gt;
         &amp;lt;client-debug-autologging&amp;gt;true&amp;lt;/client-debug-autologging&amp;gt;

         &amp;lt;!--
            When this is set to true any Aikau based errors will be posted back to the server and 
            captured by the server side logging. This can be useful to detect when errors occur in 
            a users browser --&amp;gt;
         &amp;lt;post-client-debug&amp;gt;true&amp;lt;/post-client-debug&amp;gt;
      &amp;lt;/flags&amp;gt;&lt;/PRE&gt;&lt;DIV&gt;When i come to think about it, changing the client-debug setting to true didn't actually show the menu. I had to go to page/modules/deploy and add the Debug Enabler Extension. After this, the menu showed up&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Wed, 01 Sep 2021 09:44:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-enable-javascript-logging-alfresco-community-5-2/m-p/132168#M35646</guid>
      <dc:creator>kenneth-venken</dc:creator>
      <dc:date>2021-09-01T09:44:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to enable javascript logging (Alfresco community 5.2)</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-enable-javascript-logging-alfresco-community-5-2/m-p/132169#M35647</link>
      <description>&lt;P&gt;So i found the solution. I had to enable client-debug in C:\alfresco-community\tomcat\shared\classes\alfresco\web-extension\share-config-custom.xml&lt;/P&gt;&lt;PRE&gt;   &amp;lt;!-- Global config section --&amp;gt;
   &amp;lt;config replace="true"&amp;gt;
      &amp;lt;flags&amp;gt;
         &amp;lt;!--
            Developer debugging setting to turn on DEBUG mode for client scripts in the browser
         --&amp;gt;
         &amp;lt;client-debug&amp;gt;true&amp;lt;/client-debug&amp;gt;

         &amp;lt;!--
            LOGGING can always be toggled at runtime when in DEBUG mode (Ctrl, Ctrl, Shift, Shift).
            This flag automatically activates logging on page load.
         --&amp;gt;
         &amp;lt;client-debug-autologging&amp;gt;true&amp;lt;/client-debug-autologging&amp;gt;
      &amp;lt;/flags&amp;gt;
   &amp;lt;/config&amp;gt;&lt;/PRE&gt;&lt;P&gt;After a restart of tomcat the debug menu enabled and a log4javascript popup window showed up&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Wed, 01 Sep 2021 10:03:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-enable-javascript-logging-alfresco-community-5-2/m-p/132169#M35647</guid>
      <dc:creator>kenneth-venken</dc:creator>
      <dc:date>2021-09-01T10:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to enable javascript logging (Alfresco community 5.2)</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-enable-javascript-logging-alfresco-community-5-2/m-p/132170#M35648</link>
      <description>&lt;P&gt;I'm glad you have resolved it ^_^&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 10:18:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-enable-javascript-logging-alfresco-community-5-2/m-p/132170#M35648</guid>
      <dc:creator>cristinamr</dc:creator>
      <dc:date>2021-09-01T10:18:06Z</dc:date>
    </item>
  </channel>
</rss>

