SBX - Search With Button

SBX - Forum Post Title

splitting infolog.text(1)

Microsoft Dynamics AX Forum

M.H.M.M. van den Heijkant asked a question on 7 Oct 2011 5:52 AM
My Badges

Question Status

Suggested Answer

When extracting an infolog.text(1) message and for instance saving it to a tabel, all levels of the message are put into a single string. I mean, you can put several levels of messages into an infolog by using setprefix(). But when this is done by the system, I want to be able to extract every singel level of text, and if possible check if this is a warning or error or anything else.

Can anyone help me with this.

 

Thanks for your reply

Reply
Joris de Gruyter responded on 7 Oct 2011 7:43 AM
My Badges
Suggested Answer

Use infolog.copy or infolog.cut

This will give you a container you can loop over. Each entry in the container will be a container in itself which corresponds to a line in the infolog. You can extra the columns from it:

first column: SysException enum value

second column: infolog message, the prefixes use a \t (tab) so you can parse on that to extra prefixes versus actual messages

third column: help url

optional (check number of columns in container):

fourth column: action class name

fifth column: action class options

That should do it.

Reply
Joris de Gruyter responded on 7 Oct 2011 7:43 AM
My Badges
Suggested Answer

Use infolog.copy or infolog.cut

This will give you a container you can loop over. Each entry in the container will be a container in itself which corresponds to a line in the infolog. You can extra the columns from it:

first column: SysException enum value

second column: infolog message, the prefixes use a \t (tab) so you can parse on that to extra prefixes versus actual messages

third column: help url

optional (check number of columns in container):

fourth column: action class name

fifth column: action class options

That should do it.

Reply

SBX - Two Col Forum

SBX - Migrated JS