0

I have a visualforce page with a page component showing a list of object. I need to call a controller method when a user updates an <apex:inputField> in order to print in the log that value.

Visualforce page code:

<apex:actionFunction name="updConditions" action="{!updConditions}" immediate="true" rerender="none">
    <apex:param name="value" value=""/>
 </apex:actionFunction>

...

<apex:inputField value="{!value}" style="width:100%" type="number" id="value" onchange="updConditions(this.value)"/>

Controller method:

public void updConditions(){

        String x = Apexpages.currentPage().getParameters().get('value')
        System.debug('-------here: ' + x);
}

I am sure that the function updConditions() is executed, because I see the value of x using the developer console.

Why am I not able to print anything coming from a function called by an ActionFunction?

I already read this developer forum discussion

Edit: My logging level

logging level

5
  • So you aren't seeing "--------here: " in the debug log either, right? Can you say a little more about how you know the updConditions method is being executed? – Shane Steinfeld Dec 20 '18 at 17:45
  • I entered a breakpoint in the method so using the developer console I saw the value of 'x'. – sdfcwolf Dec 20 '18 at 17:48
  • Got it. So we know it's running, but no part of your debug statement is being written out to the log, right? What logging level do you have set for Apex code? You can try forcing the debug statement to write out at that level. Example: system.debug(LoggingLevel.INFO, '------- here: ' + x); – Shane Steinfeld Dec 20 '18 at 17:55
  • @ShaneSteinfeld I edit my question. – sdfcwolf Dec 20 '18 at 17:58
  • I have to admit I have seen this too recently wherein debug statements in getters were suppressed in some use cases leaving me baffled – cropredy Dec 20 '18 at 17:59
0

This is the solution: Summer'18 relaese note

We increased the size limit for debug logs from 2 MB per log to 5 MB.

If debug log size is bigger than 5MB SF skip the Debug statement. stackexchange question

My debug log is bigger than 5MB.

In order to reduce debug log size, I change the APEX debug log level from FINEST to FINE.

Now I'm able to see my debug log.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.