Giter Site home page Giter Site logo

gweidmann / seq-app-htmlemail Goto Github PK

View Code? Open in Web Editor NEW

This project forked from datalust/seq-app-htmlemail

0.0 0.0 0.0 5.36 MB

Plug-in apps that act on event streams in the Seq log server

License: Apache License 2.0

C# 68.94% PowerShell 4.88% HTML 26.18%

seq-app-htmlemail's Introduction

Seq.App.EmailPlus Build status Join the chat at https://gitter.im/datalust/seq NuGet tag

Send log events and alerts as HTML email messages when they arrive at Seq.

HTML email app icon

HTML email templates

The app uses Handlebars.Net for email templating. Check out the Handlebars Guide for information on the Handlebars syntax.

Event types and properties

All templates can access the following special properties:

  • $DateTimeFormat — the date/time format string defined in the app's settings
  • $EventType — the numeric event type assigned to the event
  • $EventUri — a link to the event in the Seq UI (not valid for alerts)
  • $Exception — the exception associated with the event, if any
  • $Id — the Seq event id
  • $Instance — the Seq server's instance name, if any
  • $Level — the event's level as a string
  • $LocalTimestamp — the timestamp of the event, in the server's time zone (deprecated)
  • $Message — the event's fully-rendered message
  • $MessageTemplate — the event's message template
  • $Properties — a dictionary containing all first-class event properties (see below)
  • $ServerUri — the Seq server's base URL
  • $TimeZoneName — the time zone name defined in the app's settings
  • $UtcTimestamp — the timestamp of the event

The event's first-class properties do not use prefixed $ names, so if an event carries a RequestId property, this is accessed in the template as {{RequestId}}, not {{$RequestId}}.

Notifications for Alerts can use the properties listed in the Seq documentation.

Built-in helper functions

The app makes the following helper functions available in templates.

Name Description Example usage
datetime Format a date time, optionally specifying a time zone {{datetime $SliceStart 'o' 'Australia/Brisbane'}}
if_eq Compare two values for equality and optionally execute a specified block {{#if_eq $Level 'Error'}} Oops! {{/if_eq}}
pretty Pretty-print a value, converting arrays and objects to JSON {{pretty Results}}
substring Compute a substring given start index and optional length {{substring Uri 0 5}}

Helpers are defined here.

Other Seq apps

This repository originally included the following apps from Datalust, each now in their own dedicated repositories:

seq-app-htmlemail's People

Contributors

nblumhardt avatar simoncropp avatar bbrandt avatar liammclennan avatar mattmofdoom avatar tsimbalar avatar kodraus avatar alexrussak avatar normanhh3 avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.