Skip to content

Instantly share code, notes, and snippets.

View ThomasArdal's full-sized avatar
🎢

Thomas Ardal ThomasArdal

🎢
View GitHub Profile
@ThomasArdal
ThomasArdal / ErrorHandler.js
Last active November 17, 2016 20:52
Error handler with elmah.io, javascript and Axios
//ELMAH.IO error Handler:
export class ElmahIoApiUrls
{
public static CreateMessage(logId: string)
{
return "https://elmah.io/api/v2/messages?logId=" + logId;
}
}
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:elmahio="http://www.nlog-project.org/schemas/NLog.Targets.Elmah.Io.xsd"
autoReload="true"
internalLogLevel="Warn"
internalLogFile="C:\temp\internal-nlog.txt">
<extensions>
<add assembly="Elmah.Io.NLog" />
@ThomasArdal
ThomasArdal / Startup.js
Created October 26, 2017 18:37
JSNLog and elmah.io
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
loggerFactory.AddElmahIo("API_KEY", new Guid("LOG_ID"));
var api = ElmahioAPI.Create("API_KEY");
JavascriptLogging.OnLogging += loggingEventArgs =>
{
api.Messages.CreateAndNotify(new Guid("LOG_ID"), new CreateMessage
{
Title = loggingEventArgs.FinalMessage,
dasdasdas
{
"title": "JSON schema ASP.NET Core's appsettings.json file",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"definitions": {
"webOptimizer": {
"type": "object",
"description": "Settings for WebOptimizer.Core",
"properties": {
"enableCaching": {
{
"title": "JSON schema ASP.NET Core's appsettings.json file",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"definitions": {
"webOptimizer": {
"type": "object",
"description": "Settings for WebOptimizer.Core",
"properties": {
"enableCaching": {
{
"title": "JSON schema ASP.NET Core's appsettings.json file",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"definitions": {
"webOptimizer": {
"type": "object",
"description": "Settings for WebOptimizer.Core",
"properties": {
"enableCaching": {
{
title: "JSON schema ASP.NET Core's appsettings.json file",
$schema: "http://json-schema.org/draft-04/schema#",
type: "object",
definitions: {
webOptimizer: {
type: "object",
description: "Settings for WebOptimizer.Core",
properties: {
enableCaching: {
{
"title": "JSON schema ASP.NET Core's appsettings.json file",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"definitions": {
"webOptimizer": {
"type": "object",
"description": "Settings for WebOptimizer.Core",
"properties": {
"enableCaching": {
{
"title": "JSON schema ASP.NET Core's appsettings.json file",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"definitions": {
"webOptimizer": {
"type": "object",
"description": "Settings for WebOptimizer.Core",
"properties": {
"enableCaching": {