cancel
Showing results for 
Search instead for 
Did you mean: 

Log Handler - Conditional Placeholder for MediaType if not set

Jump to solution

Hi,

As you may already know a MWG7 log handler does not log the mime type (i.e text/html ) if a URL is blocked and for the following HTTP codes 500 CONNECT, 503, 515,304,407,400,502,204.

Our customer has a reporting solution that requires 10 fields, the last being mediaType.ToString(MediaType.FromHeader) to be set, even if just to a placeholder.

Is there any way to conditionally set the placeholder if not already set by MWG?

Eric

0 Kudos
1 Solution

Accepted Solutions
asabban
Level 17

Re: Log Handler - Conditional Placeholder for MediaType if not set

Jump to solution

Hi Eric,

look into this example for Client IP. If it is empty, a - will be logged, instead of nothing. I think you can adapt this for Media Type as well:

Auswahl_023.png

Gruß,

Andre

0 Kudos
2 Replies
asabban
Level 17

Re: Log Handler - Conditional Placeholder for MediaType if not set

Jump to solution

Hi Eric,

look into this example for Client IP. If it is empty, a - will be logged, instead of nothing. I think you can adapt this for Media Type as well:

Auswahl_023.png

Gruß,

Andre

0 Kudos

Re: Log Handler - Conditional Placeholder for MediaType if not set

Jump to solution

Hi Andre, works perfectly. I did the same thing for unauthenticated users but a while ago.

Thanks again.

Eric

0 Kudos