Posts

How to enable IOS debug logging for a specific user in Lawson

You may have saw our article on how to enable IOS DEBUG logging and realized after enabling it that the log gets spammed quite a bit which may actually make it harder to isolate an issue, especially if other users are currently in the system.

Today we will show you how to turn on DEBUG logging for a specific user to minimize log spam. This tutorial is only for the ios_logging.xml log.

 

  1. Login to your on-prem LSF system (admin rights required)
  2. Identify the users RM ID (case-sensitive) that you want enable debug logging for.
  3. Locate and backup your ios_logging.xml file in %LAWDIR%\system
  4. Edit ios_loggin.xml with a text editor
  5. Locate the following section:

 

<root>
<priority value=”INFO” />
<appender-ref ref=”IOS” />

<!– Appender Filters–>
<!–<appender-ref ref=”PORTAL” /> –>
<!–<appender-ref ref=”DIRECTIOS” /> –>

</root>

 

Change INFO to DEBUG:

<root>
<priority value=”DEBUG” />
<appender-ref ref=”IOS” />

<!– Appender Filters–>
<!–<appender-ref ref=”PORTAL” /> –>
<!–<appender-ref ref=”DIRECTIOS” /> –>

</root>

  1. Locate the following section:

<!– Filter for users  –>
  <!–
<filter class=”com.lawson.ios.util.log.Log4JMDCFilter”>
<param name=”keyToMatch” value=”username” />
<param name=”valueToMatch” value=”lawson” />
<param name=”denyOnMatch” value=”false” />
</filter>
<filter class=”org.apache.log4j.varia.DenyAllFilter”/>
–>

Uncomment this section (remove the <!– and –> characters shown in bold above) and edit the “valueToMatch” value=”lawson” replacing “lawson” with the RM Id of your user, like so:

        <!– Filter for users  –>

<filter class=”com.lawson.ios.util.log.Log4JMDCFilter”>
<param name=”keyToMatch” value=”username” />
<param name=”valueToMatch” value=”ENTER_USERNAME” />

            <param name=”denyOnMatch” value=”false” />
</filter>
<filter class=”org.apache.log4j.varia.DenyAllFilter”/>

  1. Save your changes (no restart required and you should see immediate changes)
  2. You should now see DEBUG entries in the log for that specific user.
  3. Just undo step 6 to revert changes (or revert to your backup file).

Good luck and happy debugging!

How to Change Lawson Portal TEST Banner

When having users test new patches, it’s a good practice to distinguish TEST from PROD visually. This helps users know what environment they’re in as they may be testing after a long day and may think they are testing in TEST when in fact they are changing production data.

 

This can simply be done by changing a banner color in Lawson Portal.

  1. Login to your TEST environment and locate your index.htm file found here: “D:\<lsf_folder>\web\lawson\portal”
  2. Assuming your index.htm file is unmodified locate header id=“topBanner”

  3. Use an online HTML Color Picker tool to choose the hex color you want to appear and replace background-color:#ff8787 to your preferred color hex color code.

Example of how it will appear:

  1. Save the changes, clear IOS cache, clear your browser cache, logout and back in to see the change. Enjoy!