diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 79d1441..0000000 --- a/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: csharp - -matrix: - include: - - os: linux # Ubuntu 14.04 - dist: trusty - sudo: required - dotnet: 2.0.0 - -script: - - ./build.sh \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..31151c5 --- /dev/null +++ b/Makefile @@ -0,0 +1,11 @@ +build: + sh build.sh + +test: build + echo "TODO" + +run-samples: + docker-compose up --build + +kill-samples: + docker-compose down \ No newline at end of file diff --git a/README.md b/README.md index 1959587..fbafc83 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Build status](https://ci.appveyor.com/api/projects/status/yt40wg34t8oj61al?svg=true)](https://ci.appveyor.com/project/serilog/serilog-sinks-splunk) ![NuGet Version](https://buildstats.info/nuget/Serilog.Sinks.Splunk) [![Join the chat at https://gitter.im/serilog/serilog](https://img.shields.io/gitter/room/serilog/serilog.svg)](https://gitter.im/serilog/serilog) -A Serilog sink that writes events to the [Splunk](https://splunk.com). Supports .NET 4.5+, .NET Core, and platforms compatible with the [.NET Platform Standard](https://github.com/dotnet/corefx/blob/master/Documentation/architecture/net-platform-standard.md) 1.1 including Windows 8 & UWP, Windows Phone and Xamarin. +A Serilog sink that writes events to the [Splunk](https://splunk.com). Supports .NET 4.5+, .NET Core, and platforms compatible with the [.NET Platform Standard](https://docs.microsoft.com/en-us/dotnet/standard/net-standard) `net45`, `netstandard1.1`, `netstandard2.0`. [![Package Logo](https://serilog.net/images/serilog-sink-nuget.png)](https://nuget.org/packages/serilog.sinks.splunk) @@ -64,9 +64,9 @@ If using `appsettings.json` for configuration the following example illustrates More information about Serilog is available on the [wiki](https://github.com/serilog/serilog-sinks-splunk/wiki). ### Build status -Branch | AppVeyor | Travis -------------- | ------------- |------------- -master | [![Build status](https://ci.appveyor.com/api/projects/status/yt40wg34t8oj61al/branch/master?svg=true)](https://ci.appveyor.com/project/serilog/serilog-sinks-splunk/branch/master) | ![](https://travis-ci.org/serilog/serilog-sinks-splunk.svg?branch=master) -dev | [![Build status](https://ci.appveyor.com/api/projects/status/yt40wg34t8oj61al/branch/dev?svg=true)](https://ci.appveyor.com/project/serilog/serilog-sinks-splunk/branch/dev) | ![](https://travis-ci.org/serilog/serilog-sinks-splunk.svg?branch=dev) +Branch | AppVeyor +------------- | ------------- +master | [![Build status](https://ci.appveyor.com/api/projects/status/yt40wg34t8oj61al/branch/master?svg=true)](https://ci.appveyor.com/project/serilog/serilog-sinks-splunk/branch/master) +dev | [![Build status](https://ci.appveyor.com/api/projects/status/yt40wg34t8oj61al/branch/dev?svg=true)](https://ci.appveyor.com/project/serilog/serilog-sinks-splunk/branch/dev) _Serilog is copyright © 2013-2016 Serilog Contributors - Provided under the [Apache License, Version 2.0](http://apache.org/licenses/LICENSE-2.0.html). Needle and thread logo a derivative of work by [Kenneth Appiah](http://www.kensets.com/)._ diff --git a/appveyor.yml b/appveyor.yml index c50fa26..179f07a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,23 +1,33 @@ version: '{build}' skip_tags: true -image: Visual Studio 2017 -configuration: Release +image: + - Visual Studio 2017 + - Ubuntu +configuration: + - Release build_script: -- ps: ./Build.ps1 + - ps: ./Build.ps1 test: off artifacts: -- path: artifacts/Serilog.*.nupkg + - path: artifacts/Serilog.*.nupkg +for: +- + matrix: + only: + - image: Ubuntu + build_script: + - sh build.sh deploy: -- provider: NuGet - api_key: - secure: bd9z4P73oltOXudAjPehwp9iDKsPtC+HbgshOrSgoyQKr5xVK+bxJQngrDJkHdY8 - skip_symbols: true - on: - branch: /^(master|dev)$/ -- provider: GitHub - auth_token: - secure: p4LpVhBKxGS5WqucHxFQ5c7C8cP74kbNB0Z8k9Oxx/PMaDQ1+ibmoexNqVU5ZlmX - artifact: /Serilog.*\.nupkg/ - tag: v$(appveyor_build_version) - on: - branch: master \ No newline at end of file + - provider: NuGet + api_key: + secure: N59tiJECUYpip6tEn0xvdmDAEiP9SIzyLEFLpwiigm/8WhJvBNs13QxzT1/3/JW/ + skip_symbols: true + on: + branch: /^(master|dev)$/ + - provider: GitHub + auth_token: + secure: p4LpVhBKxGS5WqucHxFQ5c7C8cP74kbNB0Z8k9Oxx/PMaDQ1+ibmoexNqVU5ZlmX + artifact: /Serilog.*\.nupkg/ + tag: v$(appveyor_build_version) + on: + branch: master diff --git a/build.sh b/build.sh index 498ea32..215df03 100755 --- a/build.sh +++ b/build.sh @@ -6,7 +6,7 @@ dotnet restore # Until # 65 is addressed build only core package. When available move to netstandard for all packages for path in src/**/Serilog.Sinks.Splunk.csproj; do dotnet build -f netstandard1.1 -c Release ${path} - dotnet build -f netstandard1.3 -c Release ${path} + dotnet build -f netstandard2.0 -c Release ${path} done for path in test/*.Tests/*.csproj; do diff --git a/docker-compose.yml b/docker-compose.yml index 325575a..db99c14 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,17 +1,25 @@ -version: '2' +version: '3' services: splunk: build: ./sample/splunk image: serilog-splunk + environment: + SPLUNK_START_ARGS: --accept-license --answer-yes --seed-passwd changeme + SPLUNK_ENABLE_LISTEN: 9997 + SPLUNK_PASSWORD: changemeplease! ports: - 8000:8000 - 8088:8088 - 8089:8089 - environment: - SPLUNK_START_ARGS: "--accept-license --answer-yes --seed-passwd changeme" - SPLUNK_USER: "root" + networks: + splunkbase_docker: sampleconsoleapp: depends_on: - "splunk" build: . - image: serilog-console-sample \ No newline at end of file + image: serilog-console-sample + networks: + splunkbase_docker: +networks: + splunkbase_docker: + diff --git a/run_sample.sh b/run_sample.sh deleted file mode 100644 index 173e4eb..0000000 --- a/run_sample.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -docker-compose up --build diff --git a/sample/Sample/Program.cs b/sample/Sample/Program.cs index deb5066..dc9d556 100644 --- a/sample/Sample/Program.cs +++ b/sample/Sample/Program.cs @@ -17,7 +17,7 @@ public static void Main(string[] args) { var eventsToCreate = 100; var runSSL = false; - var millisecsToWait = 30000; + var millisecsToWait = 60000; if (args.Length > 0) eventsToCreate = int.Parse(args[0]); @@ -30,9 +30,7 @@ public static void Main(string[] args) Serilog.Debugging.SelfLog.Enable(System.Console.Out); Log.Information("Sample app starting up..."); - Log.Information("Waiting {} millisecs...", millisecsToWait); - System.Threading.Thread.Sleep(millisecsToWait); UsingAppSettingsJson(eventsToCreate); diff --git a/sample/splunk/Dockerfile b/sample/splunk/Dockerfile index 5baf7bf..8c006a2 100644 --- a/sample/splunk/Dockerfile +++ b/sample/splunk/Dockerfile @@ -1,2 +1,2 @@ -FROM splunk/splunk:7.1.0 +FROM splunk/splunk:7.2 ADD etc ${SPLUNK_HOME}/etc \ No newline at end of file diff --git a/src/Serilog.Sinks.Splunk/Serilog.Sinks.Splunk.csproj b/src/Serilog.Sinks.Splunk/Serilog.Sinks.Splunk.csproj index 580f8e6..f5bfdf8 100644 --- a/src/Serilog.Sinks.Splunk/Serilog.Sinks.Splunk.csproj +++ b/src/Serilog.Sinks.Splunk/Serilog.Sinks.Splunk.csproj @@ -2,7 +2,7 @@ The Splunk Sink for Serilog - 3.1.0 + 3.2.0 Matthew Erbs, Serilog Contributors net45;netstandard1.1;netstandard2.0 true @@ -14,7 +14,6 @@ http://www.apache.org/licenses/LICENSE-2.0 https://github.com/serilog/serilog-sinks-splunk git - false ../../assets/Serilog.snk true true