Hi all,

I have a function that logs errors in service center even though 'Log Error' is set to 'No'. This function is called a lot of times and thus is flooding my monitoring with unwanted error messages. How can I disabled this?


Situation:
I have a function which raises an exception quite often (which is expected behavior).
I catch the exception and do not abort the transaction nor do I log the error, as shown in the figure.


However, in service center all log messages coming from this function are still logged. 


This is my set-up:

How can I disable the log messages?


Thank you.

Kind regards,
Wietse

Hi Wietse,

The Exception messages aren't logged, but any other messages, like the ones written by LogMessage, are of course logged (since "Abort Transaction" is set to No).

Kilian Hekhuis wrote:

Hi Wietse,

The Exception messages aren't logged, but any other messages, like the ones written by LogMessage, _are_ of course logged (since "Abort Transaction" is set to No).

Hi Kilian,

The problem is they ARE logged. They are flooding my service center monitoring.
(It is a batch process running). It is perfectly normal that I have so many errors, but I do not want them in my error logs.

EDIT: In case you are wondering: I'm reading XPaths in an XML of optional fields - so sometimes it retrieves an undefined and I'm catching it with the exception handler. But I do NOT want to see all these errors in my Error Log.


Solution

Hi Wietse,

As you can see by the "Extension method" in the Module column, these are not the Exceptions that are caught by your Module, but by the Extension itself. If you had enabled the "Log Error" in your Exception handling, you would've seen the errors twice. So the behaviour is correct.

That said, that doesn't relieve you of those messages of course :). First, the "Object reference not set to an instance of an object" is a very bad error. It basically means you hit a bug in the Extension. It should not be the normal way to handle what you're trying to do. So I'd first focus on that, see if you can circumvent this error (maybe path the Extension? What Extension are you using?). Secondly, I'm not sure if you can disable this kind of error logging from the Extension. What you could try to do is disable the Extension's "Activity Logging" on the Extension's Operation Tab in Service Center. If that doesn't work, please see my first remark :).

Solution

Kilian Hekhuis wrote:

Hi Wietse,

As you can see by the "Extension method" in the Module column, these are not the Exceptions that are caught by your Module, but by the Extension itself. If you had enabled the "Log Error" in your Exception handling, you would've seen the errors twice. So the behaviour is correct.

That said, that doesn't relieve you of those messages of course :). First, the "Object reference not set to an instance of an object" is a very bad error. It basically means you hit a bug in the Extension. It should not be the normal way to handle what you're trying to do. So I'd first focus on that, see if you can circumvent this error (maybe path the Extension? What Extension are you using?). Secondly, I'm not sure if you can disable this kind of error logging from the Extension. What you could try to do is disable the Extension's "Activity Logging" on the Extension's Operation Tab in Service Center. If that doesn't work, please see my first remark :).


Hi Kilian,

Thank you! That at least explains the errors. 

Just for the completeness: I'm using the XML extension from the forge and reading out nodes via XPath. When retrieving a node that is optional (I do not know upfront if the node exists or not) I get the "Object reference not set to an instance of an object"-error for nodes that were not in the XML. It's because it tries to read a node that does not exist. I just catch the error and continue because reading the rest of the XML. It's because the extension itself is giving the wrong response if a node is not found. A "null"-response would be handy but not possible :). 

Anyway, marked as solved. Thank you.

Wietse



Hi Wietse,

I think the Extension shouldn't give that error, but anyway, I'm sorry I couldn't be of more help :). Happy coding!