<commit_before>---
title: How to search custom data
description: TODO
---

# How to search custom data

Custom data is not searchable by default. Sometimes it makes sense, that errors can be searched from values logged as part of custom data. For now, this feature is supported through the use of variable naming, but we may extend this to a configuration option through the API or UI as well.

To make a custom variable and its value searchable through the UI (as well as through the API), name the variable with the prefix `X-ELMAHIO-SEARCH-`. The variable will become searchable through the name added after the prefix.

Examples:

<div class="tabbable-responsive">
<div class="tabbable">
<ul class="nav nav-tabs" role="tablist">
    <li role="presentation" class="nav-item"><a class="nav-link active" href="#aspnet" aria-controls="home" role="tab" data-toggle="tab">ASP.NET</a></li>
    <li role="presentation" class="nav-item"><a class="nav-link" href="#aspnetcore" aria-controls="profile" role="tab" data-toggle="tab">ASP.NET Core</a></li>
    <li role="presentation" class="nav-item"><a class="nav-link" href="#serilog" aria-controls="profile" role="tab" data-toggle="tab">Serilog</a></li>
    <li role="presentation" class="nav-item"><a class="nav-link" href="#nlog" aria-controls="profile" role="tab" data-toggle="tab">NLog</a></li>
    <li role="presentation" class="nav-item"><a class="nav-link" href="#log4net" aria-controls="profile" role="tab" data-toggle="tab">log4net</a></li>
    <li role="presentation" class="nav-item"><a class="nav-link" href="#mel" aria-controls="profile" role="tab" data-toggle="tab">Microsoft.Extensions.Logging</a></li>
</ul>
</div>
</div>

<div class="tab-content tab-content-tabbable" markdown="1">
<div role="tabpanel" class="tab-pane active" id="aspnet" markdown="1">
```csharp
Elmah.ErrorLog.GetDefault(null);
var logger = Elmah.Io.ErrorLog.Client;<commit_msg>Fixed TODO in search custom data page<commit_after>---
title: How to search custom data
description: Learn how to make properties searchable on elmah.io. By using a special naming convention you can run full-text searches on custom properties.
---

# How to search custom data

Custom data is not searchable by default. Sometimes it makes sense that errors can be searched from values logged as part of custom data. For now, this feature is supported through the use of variable naming, but we may extend this to a configuration option through the API or UI as well.

To make a custom variable and its value searchable through the UI (as well as through the API), name the variable with the prefix `X-ELMAHIO-SEARCH-`. The variable will become searchable through the name added after the prefix.

Examples:

<div class="tabbable-responsive">
<div class="tabbable">
<ul class="nav nav-tabs" role="tablist">
    <li role="presentation" class="nav-item"><a class="nav-link active" href="#aspnet" aria-controls="home" role="tab" data-toggle="tab">ASP.NET</a></li>
    <li role="presentation" class="nav-item"><a class="nav-link" href="#aspnetcore" aria-controls="profile" role="tab" data-toggle="tab">ASP.NET Core</a></li>
    <li role="presentation" class="nav-item"><a class="nav-link" href="#serilog" aria-controls="profile" role="tab" data-toggle="tab">Serilog</a></li>
    <li role="presentation" class="nav-item"><a class="nav-link" href="#nlog" aria-controls="profile" role="tab" data-toggle="tab">NLog</a></li>
    <li role="presentation" class="nav-item"><a class="nav-link" href="#log4net" aria-controls="profile" role="tab" data-toggle="tab">log4net</a></li>
    <li role="presentation" class="nav-item"><a class="nav-link" href="#mel" aria-controls="profile" role="tab" data-toggle="tab">Microsoft.Extensions.Logging</a></li>
</ul>
</div>
</div>

<div class="tab-content tab-content-tabbable" markdown="1">
<div role="tabpanel" class="tab-pane active" id="aspnet" markdown="1">
```csharp
Elmah.ErrorLog.GetDefault(null);
var logger = Elmah.Io.ErrorLog.Client;
{'fraction_non_alphanumeric': 0.16033224263780518, 'fraction_numerical': 0.0020135917442738486, 'mean_word_length': 5.712837837837838, 'pattern_counts': {'":': 0, '<': 67, '<?xml version=': 0, '>': 67, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '343630', 'n_tokens_mistral': 1234, 'n_tokens_neox': 1206, 'n_words': 386}