PM> Install-Package Serilog.Extras.AppSettings
... = new LoggerConfiguration()
var builder = new ContainerBuilder(); | |
// The thing we want to create haphazardly without ever | |
// disposing it or any of its dependencies: | |
builder.RegisterType<Foo>() | |
.Named<IFoo>("untracked"); | |
// Owned<T> is itself untracked (i.e. disposal is up to the | |
// owner.) Since we just let the Owned<IFoo> slip away, it |
var module = angular.module('octopusApp.projects'); | |
module.controller('ProjectReleaseController', function ($scope, busy, $routeParams, pageTitle, octopusRepository, $q) { | |
var isLoading = $scope.isLoading = busy.create(); | |
var projectId = $routeParams["id"]; | |
var releaseVersion = $routeParams["version"]; | |
var project, release, deploymentProcess; | |
isLoading.promise(octopusRepository.Projects.get(projectId).then(function (project2) { | |
project = project2; |
using Seq.Apps; | |
using Seq.Apps.LogEvents; | |
namespace Seq.BuiltIn.SampleApp | |
{ | |
public class SampleReactor : Reactor, ISubscribeTo<LogEventData> | |
{ | |
public void On(Event<LogEventData> evt) | |
{ | |
if (evt.Data.Level == LogEventLevel.Error) |
using Seq.Apps; | |
using Seq.Apps.LogEvents; | |
using System; | |
using System.Linq; | |
namespace Seq.Sample.SlidingWindows | |
{ | |
/// <summary> | |
/// Counts events in a sliding time window, writing a message back to the | |
/// stream when a set threshold is reached. |
public static class LoggerExtensions | |
{ | |
public static ILogger ForHere( | |
this ILogger logger, | |
[CallerFilePath] string sourceFile = null, | |
[CallerLineNumber] int sourceLine = 0) | |
{ | |
return logger | |
.ForContext("SourceFile", sourceFile) | |
.ForContext("SourceLine", sourceLine); |
## -------------------------------------------------------------------------------------- | |
## Configuration | |
## -------------------------------------------------------------------------------------- | |
$ConfirmPreference = "None" | |
$isEnabled = $OctopusParameters["Octopus.Action.IISWebSite.CreateOrUpdateWebSite"] | |
if (!$isEnabled -or ![Bool]::Parse($isEnabled)) | |
{ | |
exit 0 |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Serilog; | |
using Serilog.Core; | |
using Serilog.Events; | |
using Serilog.Formatting.Json; |
Import-Module Seq | |
# Specify the Seq server URL; an -apiKey can also be provided. | |
# Any properties set here will be attached to all events. | |
$seq = Open-Seq "http://my-seq" -properties @{ Machine = $env:ComputerName } | |
# Simple information method | |
Send-SeqEvent $seq "Hello from PowerShell" |
<h3>Task summary:</h3> | |
<ol> | |
#{each step in Octopus.Step} | |
<li>#{step.Name | HtmlEscape} — <strong>#{step.Status.Code}</strong> #{step.Status.Error | HtmlEscape} | |
#{if step.Status.ErrorDetail} | |
<pre>#{step.Status.ErrorDetail | HtmlEscape}</pre> | |
#{/if} | |
</li> | |
#{/each} | |
</ol> |