VOOZH about

URL: https://www.nuget.org/packages/ElmahCoreEx.MySql/2.1.3-alpha.1.20

⇱ NuGet Gallery | ElmahCoreEx.MySql 2.1.3-alpha.1.20




ElmahCoreEx.MySql 2.1.3-alpha.1.20

This is a prerelease version of ElmahCoreEx.MySql.
There is a newer version of this package available.
See the version list below for details.
dotnet add package ElmahCoreEx.MySql --version 2.1.3-alpha.1.20
 
 
NuGet\Install-Package ElmahCoreEx.MySql -Version 2.1.3-alpha.1.20
 
 
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ElmahCoreEx.MySql" Version="2.1.3-alpha.1.20" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ElmahCoreEx.MySql" Version="2.1.3-alpha.1.20" />
 
Directory.Packages.props
<PackageReference Include="ElmahCoreEx.MySql" />
 
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ElmahCoreEx.MySql --version 2.1.3-alpha.1.20
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ElmahCoreEx.MySql, 2.1.3-alpha.1.20"
 
 
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ElmahCoreEx.MySql@2.1.3-alpha.1.20
 
 
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ElmahCoreEx.MySql&version=2.1.3-alpha.1.20&prerelease
 
Install as a Cake Addin
#tool nuget:?package=ElmahCoreEx.MySql&version=2.1.3-alpha.1.20&prerelease
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

👁 Build Status
👁 Latest Version
👁 Version Pre-release
👁 Last Commit

👁 Code Quality
👁 Dependencies

👁 License
👁 Contributors

About

This is a fork of the ElmahCore project, with changes for PR's that were sitting idle. It should be an almost slot in replacement for ElmahCore v2.1.2.

See for any further changes from v2.1.2

The interfaces and namespaces have been kept the same.

License

This project is licensed under the terms of the Apache license 2.0.

Warnings & Dragons

The source code for the front end appears non-existent, in ElmahCore the front end Vue SPA files are all minified. Consider this a warning sign for the continuation of the front end without a rewrite WITH SOURCE. Source-maps may have enough content to obtain the code but this has not be investigated.

Using ElmahCore

ELMAH for Net.Standard 2.0 and .Net 6

Add NuGet package ElmahCoreEx

Simple usage

// Startup.cs
services.AddElmah() //in ConfigureServices
// ...
app.UseElmah(); //in Configure, must be set after initializing other exception handlers
 //such as UseExceptionHandler and UseDeveloperExceptionPage

Default ELMAH endpoint path ~/elmah.

Change URL path

services.AddElmah(options => options.Path = "you_path_here")

Restrict access to the ELMAH URL

services.AddElmah(options =>
{
 options.OnPermissionCheck = context => context.User.Identity.IsAuthenticated;
});
app.UseAuthentication();
app.UseAuthorization();
app.UseElmah(); //needs to be placed after `UseAuthentication` and `UseAuthorization`

or the user will be redirected to the sign in screen even if they are authenticated.

Change Error Log type

You can create your own error log, which will store errors anywhere.

public class MyErrorLog: ErrorLog {
 // Implement ErrorLog
} 

The ErrorLog adapters:

  • MemoryErrorLog – store errors in memory (by default)
  • XmlFileErrorLog – store errors in XML files
  • SqlErrorLog - store errors in MS SQL (add reference to ElmahCoreEx.Sql)
  • MysqlErrorLog - store errors in MySQL (add reference to ElmahCoreEx.MySql)
  • PgsqlErrorLog - store errors in PostgreSQL (add reference to ElmahCoreEx.Postgresql)
services.AddElmah<XmlFileErrorLog>(options =>
{
 options.LogPath = "~/log"; // OR options.LogPath = "с:\errors";
});
services.AddElmah<SqlErrorLog>(options =>
{
 options.ConnectionString = "connection_string";
 options.SqlServerDatabaseSchemaName = "Errors"; //Defaults to dbo if not set
 options.SqlServerDatabaseTableName = "ElmahError"; //Defaults to ELMAH_Error if not set
});

Raise exception

public IActionResult Test()
{
 HttpContext.RaiseError(new InvalidOperationException("Test"));
 ...
}

Microsoft.Extensions.Logging support

Since version 2.0 ElmahCore support Microsoft.Extensions.Logging

Source Preview

Since version 2.0.1 ElmahCore support source preview. Just add paths to source files.

services.AddElmah(options =>
{
 options.SourcePaths = new []
 {
 @"D:\src\ElmahCore.DemoCore6",
 @"D:\src\ElmahCore.Mvc",
 @"D:\src\ElmahCore"
 };
});

Log the request body

Since version 2.0.5 ElmahCore can log the request body.

Logging SQL request body

Since version 2.0.6 ElmahCore can log the SQL request body.

Logging method parameters

Since version 2.0.6 ElmahCore can log method parameters.

using ElmahCore;
...

public void TestMethod(string p1, int p2)
{
 // Logging method parameters
 this.LogParams((nameof(p1), p1), (nameof(p2), p2));
 ...
}

Using UseElmahExceptionPage

You can replace UseDeveloperExceptionPage to UseElmahExceptionPage

if (env.IsDevelopment())
{
 // app.UseDeveloperExceptionPage();
 app.UseElmahExceptionPage();
}

Using Notifiers

You can create your own notifiers by implement IErrorNotifier or IErrorNotifierWithId interface and add notifier to Elmah options:

services.AddElmah<XmlFileErrorLog>(options =>
{
 options.Path = @"errors";
 options.LogPath = "~/logs";
 options.Notifiers.Add(new ErrorMailNotifier("Email",emailOptions));
});

Each notifier must have unique name.

Using Filters

You can use Elmah XML filter configuration in separate file, create and add custom filters:

services.AddElmah<XmlFileErrorLog>(options =>
{
 options.FiltersConfig = "elmah.xml";
 options.Filters.Add(new MyFilter());
})

Custom filter must implement IErrorFilter. XML filter config example:

<?xml version="1.0" encoding="utf-8" ?>
<elmah>
 <errorFilter>
 <notifiers>
 <notifier name="Email"/>
 </notifiers>
 <test>
 <and>
 <greater binding="HttpStatusCode" value="399" type="Int32" />
 <lesser binding="HttpStatusCode" value="500" type="Int32" />
 </and>
 </test>
 </errorFilter>
</elmah>

see more here

JavaScript filters not yet implemented

Add notifiers to errorFilter node if you do not want to send notifications Filtered errors will be logged, but will not be sent.

Product Versions Compatible and additional computed target framework versions.
.NET net5.0 net5.0 was computed.  net5.0-windows net5.0-windows was computed.  net6.0 net6.0 is compatible.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 was computed.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 was computed.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
.NET Core netcoreapp2.0 netcoreapp2.0 was computed.  netcoreapp2.1 netcoreapp2.1 was computed.  netcoreapp2.2 netcoreapp2.2 was computed.  netcoreapp3.0 netcoreapp3.0 was computed.  netcoreapp3.1 netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 netstandard2.0 is compatible.  netstandard2.1 netstandard2.1 was computed. 
.NET Framework net461 net461 was computed.  net462 net462 was computed.  net463 net463 was computed.  net47 net47 was computed.  net471 net471 was computed.  net472 net472 was computed.  net48 net48 was computed.  net481 net481 was computed. 
MonoAndroid monoandroid monoandroid was computed. 
MonoMac monomac monomac was computed. 
MonoTouch monotouch monotouch was computed. 
Tizen tizen40 tizen40 was computed.  tizen60 tizen60 was computed. 
Xamarin.iOS xamarinios xamarinios was computed. 
Xamarin.Mac xamarinmac xamarinmac was computed. 
Xamarin.TVOS xamarintvos xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.1.6 568 2/12/2026
2.1.5 500 2/12/2026
2.1.4-beta.1.1 187 2/5/2025
2.1.3 2,461 7/7/2023
2.1.3-beta.1 214 6/27/2023
2.1.3-alpha.2 201 6/27/2023
2.1.3-alpha.1.20 182 6/27/2023
2.1.3-alpha.1.2 202 6/5/2023
2.1.3-alpha.1.1 197 6/5/2023
2.1.3-alpha.1 197 6/5/2023
2.1.3-alpha.0.20 199 6/3/2023
2.1.3-alpha.0 214 6/2/2023
0.0.0-alpha.0.127 226 6/2/2023