Skip to content
This repository was archived by the owner on Nov 3, 2021. It is now read-only.

Commit bc6778d

Browse files
committed
Initial unfinished version
1 parent 875365c commit bc6778d

16 files changed

+541
-22
lines changed

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Auto detect text files and perform LF normalization
2+
3+
* text=auto

.gitignore

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,8 @@
44
# User-specific files
55
*.suo
66
*.user
7-
*.userosscache
87
*.sln.docstates
98

10-
# User-specific files (MonoDevelop/Xamarin Studio)
11-
*.userprefs
12-
139
# Build results
1410
[Dd]ebug/
1511
[Dd]ebugPublic/
@@ -22,14 +18,14 @@ bld/
2218
[Bb]in/
2319
[Oo]bj/
2420

25-
# Visual Studo 2015 cache/options directory
26-
.vs/
21+
# Roslyn cache directories
22+
*.ide/
2723

2824
# MSTest test Results
2925
[Tt]est[Rr]esult*/
3026
[Bb]uild[Ll]og.*
3127

32-
# NUNIT
28+
#NUNIT
3329
*.VisualState.xml
3430
TestResult.xml
3531

@@ -140,7 +136,7 @@ publish/
140136
**/packages/*
141137
# except build/, which is used as an MSBuild target.
142138
!**/packages/build/
143-
# Uncomment if necessary however generally it will be regenerated when needed
139+
# If using the old MSBuild-Integrated Package Restore, uncomment this:
144140
#!**/packages/repositories.config
145141

146142
# Windows Azure Build Output
@@ -151,7 +147,8 @@ csx/
151147
AppPackages/
152148

153149
# Others
154-
*.[Cc]ache
150+
sql/
151+
*.Cache
155152
ClientBin/
156153
[Ss]tyle[Cc]op.*
157154
~$*
@@ -161,7 +158,6 @@ ClientBin/
161158
*.pfx
162159
*.publishsettings
163160
node_modules/
164-
bower_components/
165161

166162
# RIA/Silverlight projects
167163
Generated_Code/
@@ -185,12 +181,3 @@ UpgradeLog*.htm
185181

186182
# Microsoft Fakes
187183
FakesAssemblies/
188-
189-
# Node.js Tools for Visual Studio
190-
.ntvs_analysis.dat
191-
192-
# Visual Studio 6 build log
193-
*.plg
194-
195-
# Visual Studio 6 workspace options file
196-
*.opt

.nuget/packages.config

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="serilog-generator" version="0.1.9" />
4+
</packages>

Build.ps1

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
param(
2+
[String] $majorMinor = "0.0", # 2.0
3+
[String] $patch = "0", # $env:APPVEYOR_BUILD_VERSION
4+
[String] $customLogger = "", # C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll
5+
[Switch] $notouch,
6+
[String] $sln # e.g serilog-sink-name
7+
)
8+
9+
function Set-AssemblyVersions($informational, $assembly)
10+
{
11+
(Get-Content assets/CommonAssemblyInfo.cs) |
12+
ForEach-Object { $_ -replace """1.0.0.0""", """$assembly""" } |
13+
ForEach-Object { $_ -replace """1.0.0""", """$informational""" } |
14+
ForEach-Object { $_ -replace """1.1.1.1""", """$($informational).0""" } |
15+
Set-Content assets/CommonAssemblyInfo.cs
16+
}
17+
18+
function Install-NuGetPackages($solution)
19+
{
20+
nuget restore $solution
21+
}
22+
23+
function Invoke-MSBuild($solution, $customLogger)
24+
{
25+
if ($customLogger)
26+
{
27+
msbuild "$solution" /verbosity:minimal /p:Configuration=Release /logger:"$customLogger"
28+
}
29+
else
30+
{
31+
msbuild "$solution" /verbosity:minimal /p:Configuration=Release
32+
}
33+
}
34+
35+
function Invoke-NuGetPackProj($csproj)
36+
{
37+
nuget pack -Prop Configuration=Release -Symbols $csproj
38+
}
39+
40+
function Invoke-NuGetPackSpec($nuspec, $version)
41+
{
42+
nuget pack $nuspec -Version $version -OutputDirectory ..\..\
43+
}
44+
45+
function Invoke-NuGetPack($version)
46+
{
47+
ls src/**/*.csproj |
48+
Where-Object { -not ($_.Name -like "*net40*") } |
49+
ForEach-Object { Invoke-NuGetPackProj $_ }
50+
}
51+
52+
function Invoke-Build($majorMinor, $patch, $customLogger, $notouch, $sln)
53+
{
54+
$package="$majorMinor.$patch"
55+
$slnfile = "$sln.sln"
56+
57+
Write-Output "$sln $package"
58+
59+
if (-not $notouch)
60+
{
61+
$assembly = "$majorMinor.0.0"
62+
63+
Write-Output "Assembly version will be set to $assembly"
64+
Set-AssemblyVersions $package $assembly
65+
}
66+
67+
Install-NuGetPackages $slnfile
68+
69+
Invoke-MSBuild $slnfile $customLogger
70+
71+
Invoke-NuGetPack $package
72+
}
73+
74+
$ErrorActionPreference = "Stop"
75+
76+
if (-not $sln)
77+
{
78+
$slnfull = ls *.sln |
79+
Where-Object { -not ($_.Name -like "*net40*") } |
80+
Select -first 1
81+
82+
$sln = $slnfull.BaseName
83+
}
84+
85+
Invoke-Build $majorMinor $patch $customLogger $notouch $sln

CHANGES.md

Whitespace-only changes.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Apache License
1+
Apache License
22
Version 2.0, January 2004
33
http://www.apache.org/licenses/
44

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1-
# serilog-sinks-literate
2-
A console sink for Serilog that pretty-prints embedded properties
1+
# Serilog.Sinks.Literate
2+
3+
An alternative _colored console_ sink for Serilog that writes events with embedded syntax highlighting (a-la 'Literate Programming').
4+
5+
**This is an unfinished work-in-progress**

assets/CommonAssemblyInfo.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
using System.Reflection;
2+
3+
[assembly: AssemblyVersion("1.0.0.0")]
4+
[assembly: AssemblyFileVersion("1.1.1.1")]
5+
[assembly: AssemblyInformationalVersion("1.0.0")]

assets/Serilog.snk

596 Bytes
Binary file not shown.

serilog-sinks-literate.sln

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 2013
4+
VisualStudioVersion = 12.0.31101.0
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Sinks.Literate", "src\Serilog.Sinks.Literate\Serilog.Sinks.Literate.csproj", "{F3B80F77-155C-434D-9865-2E522D072972}"
7+
EndProject
8+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{3E4A9D17-64DF-4D9A-9335-D2889FDB33B2}"
9+
ProjectSection(SolutionItems) = preProject
10+
.nuget\packages.config = .nuget\packages.config
11+
EndProjectSection
12+
EndProject
13+
Global
14+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
15+
Debug|Any CPU = Debug|Any CPU
16+
Release|Any CPU = Release|Any CPU
17+
EndGlobalSection
18+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
19+
{F3B80F77-155C-434D-9865-2E522D072972}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
20+
{F3B80F77-155C-434D-9865-2E522D072972}.Debug|Any CPU.Build.0 = Debug|Any CPU
21+
{F3B80F77-155C-434D-9865-2E522D072972}.Release|Any CPU.ActiveCfg = Release|Any CPU
22+
{F3B80F77-155C-434D-9865-2E522D072972}.Release|Any CPU.Build.0 = Release|Any CPU
23+
EndGlobalSection
24+
GlobalSection(SolutionProperties) = preSolution
25+
HideSolutionNode = FALSE
26+
EndGlobalSection
27+
EndGlobal

0 commit comments

Comments
 (0)