XML Parser can't read data in log


Author
Message
dwhite
dwhite
New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)
Group: Forum Members
Posts: 5, Visits: 18
It looks like whenever  <GetRolesForUser> is in my log file LOGview just stops reading the log. It will show all the log entries up until it finds an entry with  <GetRolesForUser> inside it and then just stops. If I delete <GetRolesForUser> out of the log file, it will show the entry info and continue on until it finds another entry with <GetRolesForUser> in it. 

Is there a way to get the parser to ignore <GetRolesForUser> ?
dwhite
dwhite
New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)
Group: Forum Members
Posts: 5, Visits: 18
After taking another look it seems to have more to do with the <>. If I have a line in my data like

Web.Modules.ModuleManagerService.c.<bla>b__6_4(PortalModule a, DataTable b, DataRow c)

It will get stuck on <bla>
LogViewPlus Support
LogViewPlus Support
Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)
Group: Moderators
Posts: 1.1K, Visits: 3.7K
Hi,

Thanks for reporting this issue.

It sounds like your log entries are not valid XML.  For example, a <bla> tag should have a closing </bla> tag.  Is this the case?  It might help to use an online XML validator.

Thanks,

Toby
dwhite
dwhite
New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)
Group: Forum Members
Posts: 5, Visits: 18
Hey Toby

It is bad XML, I figured that. What I was hoping is your program had a way of ignoring data between a particular section like

Ignore anything between the <Exception></Exception>

<Exception>
ModuleManagerService.<>c.<Get>b__6_8(PortalModule a, DataTable b, DataRow c)
</Exception>

I'm going to guess by your reply that's a hard no.
LogViewPlus Support
LogViewPlus Support
Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)
Group: Moderators
Posts: 1.1K, Visits: 3.7K
Unfortunately - this is currently unsupported.  The XmlParser expects log entries to be valid XML.

Have you tried configuring a PatternParser?  If you could send me a sample log entry - I might be able to help.
Edited 4 Years Ago by LogViewPlus Support
dwhite
dwhite
New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)
Group: Forum Members
Posts: 5, Visits: 18
That would be great! If you can figure out how to get it to read something similar to this, I'll move off the trial version today. You can see where it gets stuck.

<LogEntry>
        <LogType>Error</LogType>
        <Timestamp>2020-06-23 02:00:01-05:00</Timestamp>
        <UserID>abc</UserID>
        <AuthorizationUser><![CDATA[joe]]></AuthorizationUser>
        <Message><![CDATA[Error while loading a Service for the module]]></Message>
        <Exception>
<![CDATA[System.Configuration.ConfigurationErrorsException: The Service for the module,

 Web.Modules.ModuleManagerService.<>c.<Get>b__6_8(PortalModule a, DataTable b, DataRow c)
 ModuleManagerService.ProcessCollection[T](PortalModule module, ICollection`1 collection, DataTable table, Func`4 creator)
]]></Exception>
        <ModuleName>bla</ModuleName>
    </LogEntry>
LogViewPlus Support
LogViewPlus Support
Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)
Group: Moderators
Posts: 1.1K, Visits: 3.7K
Your log entry is valid XML and therefore should be parsed with the XmlParser. The 'invalid' data we discussed above is actually inside of a CDATA tag - which means the entry is completely valid.

Unfortunately, it appears that CDATA sections are not currently supported. This is a serious oversight on our part. We will resolve this bug and issue a new release as soon as possible. We should have something for you in the next day or two.

Thanks for bringing this problem to our attention!

Toby
LogViewPlus Support
LogViewPlus Support
Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)
Group: Moderators
Posts: 1.1K, Visits: 3.7K
Hi D,

I just wanted to let you know that we have now released LogViewPlus v2.4.36 as a BETA release.

This release resolves the issue with XML parsing discussed above.  You should now be able to parse your file using the XmlParser with the pattern:

<LogEntry>
  <LogType>%p</LogType>
  <Timestamp>%d{yyyy-MM-dd %H:mm:sszzzz}</Timestamp>
  <UserID>%S{UserID}</UserID>
  <AuthorizationUser>%S{AuthorizationUser}</AuthorizationUser>
  <Message>%m</Message>
  <Exception>%S{Exception}</Exception>
  <ModuleName>%S{ModuleName}</ModuleName>
</LogEntry>




Hope that helps.  Please let me know if you have any further questions or issues.

Toby


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Login

Explore
Messages
Mentions
Search