Skip to content

Commit f122cc3

Browse files
author
zmn
committed
initial commit
1 parent bf3145e commit f122cc3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1840
-0
lines changed

Diff for: .gitattributes

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
###############################################################################
2+
# Set default behavior to automatically normalize line endings.
3+
###############################################################################
4+
* text=auto
5+
6+
###############################################################################
7+
# Set default behavior for command prompt diff.
8+
#
9+
# This is need for earlier builds of msysgit that does not have it on by
10+
# default for csharp files.
11+
# Note: This is only used by command line
12+
###############################################################################
13+
#*.cs diff=csharp
14+
15+
###############################################################################
16+
# Set the merge driver for project and solution files
17+
#
18+
# Merging from the command prompt will add diff markers to the files if there
19+
# are conflicts (Merging from VS is not affected by the settings below, in VS
20+
# the diff markers are never inserted). Diff markers may cause the following
21+
# file extensions to fail to load in VS. An alternative would be to treat
22+
# these files as binary and thus will always conflict and require user
23+
# intervention with every merge. To do so, just uncomment the entries below
24+
###############################################################################
25+
#*.sln merge=binary
26+
#*.csproj merge=binary
27+
#*.vbproj merge=binary
28+
#*.vcxproj merge=binary
29+
#*.vcproj merge=binary
30+
#*.dbproj merge=binary
31+
#*.fsproj merge=binary
32+
#*.lsproj merge=binary
33+
#*.wixproj merge=binary
34+
#*.modelproj merge=binary
35+
#*.sqlproj merge=binary
36+
#*.wwaproj merge=binary
37+
38+
###############################################################################
39+
# behavior for image files
40+
#
41+
# image files are treated as binary by default.
42+
###############################################################################
43+
#*.jpg binary
44+
#*.png binary
45+
#*.gif binary
46+
47+
###############################################################################
48+
# diff behavior for common document formats
49+
#
50+
# Convert binary document formats to text before diffing them. This feature
51+
# is only available from the command line. Turn it on by uncommenting the
52+
# entries below.
53+
###############################################################################
54+
#*.doc diff=astextplain
55+
#*.DOC diff=astextplain
56+
#*.docx diff=astextplain
57+
#*.DOCX diff=astextplain
58+
#*.dot diff=astextplain
59+
#*.DOT diff=astextplain
60+
#*.pdf diff=astextplain
61+
#*.PDF diff=astextplain
62+
#*.rtf diff=astextplain
63+
#*.RTF diff=astextplain

Diff for: WLog.Clients.Log4Net/BufferedWebAppender.cs

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
using log4net.Appender;
2+
using log4net.Core;
3+
using Newtonsoft.Json;
4+
using System;
5+
using System.Collections.Generic;
6+
using System.Linq;
7+
using System.Text;
8+
using System.Threading.Tasks;
9+
using Wlog.Clients.Classes;
10+
using Wlog.Clients.Helpers;
11+
12+
namespace Wlog.Clients.Log4Net
13+
{
14+
public class BufferedWebAppender : BufferingAppenderSkeleton
15+
{
16+
public BufferedWebAppender()
17+
{
18+
this.Name = "BufferedWebAppender";
19+
}
20+
public string Destination { get; set; }
21+
public string ApplicationKey { get; set; }
22+
protected override void SendBuffer(LoggingEvent[] events)
23+
{
24+
List<LogMessage> entry = events.Select(p => new LogMessage()
25+
{
26+
ApplicationKey = ApplicationKey,
27+
Level = p.Level.ToString(),
28+
Message = p.RenderedMessage,
29+
SourceDate = p.TimeStamp
30+
}).ToList();
31+
32+
LogHelper.DoRequest(Destination, JsonConvert.SerializeObject(entry));
33+
}
34+
}
35+
}
+130
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<!-- Place MSBuild properties below this comment... -->
5+
6+
<RunOverPack Condition="'$(RunOverPack)'==''">true</RunOverPack>
7+
<OverPackIncludeReferencedProjects Condition="'$(OverPackIncludeReferencedProjects)' == ''">true</OverPackIncludeReferencedProjects>
8+
<!--
9+
Uncomment and override any of the following properties to customize how
10+
your NuGet package is created and/or published. All of these properties
11+
may even be specified in your TFS build definition such as "/p:RunOverPack=true".
12+
13+
<RunOverPack Condition="'$(RunOverPack)'==''">true</RunOverPack>
14+
By default, all the tasks are disabled and you must explicitly enable
15+
them by specifing the property below. If this property is omitted, blank,
16+
or false then your NuGet package will not be created or published.
17+
18+
<OverPackNuGetExePath Condition="'$(OverPackNuGetExePath)' == ''"></OverPackNuGetExePath>
19+
Specifies the location for the NuGet.exe command. The default behavior is
20+
to check the following in order:
21+
1) The latest version of 'NuGet.CommandLine' (under the 'tools' subfolder) in the solution packages folder.
22+
2) Attempting to find 'NuGet.exe' in the system's PATH environment variable by using the SearchPath Win32 API.
23+
Usually one of these methods will always succeed, but if any of the above
24+
fail, then the user must specify the location of the NuGet.exe command
25+
with this property.
26+
27+
NuGet Pack Command:
28+
http://docs.nuget.org/docs/Reference/Command-Line-Reference#Pack_Command
29+
30+
<OverPackInputFile Condition="'$(OverPackInputFile)' == ''">$(ProjectPath)</OverPackInputFile>
31+
A convienent way to create a NuGet package from a csproj or vbproj that
32+
supports replacement tokens in the NuSpec file. This is the default
33+
behavior.
34+
http://docs.nuget.org/docs/reference/nuspec-reference#Replacement_Tokens
35+
http://docs.nuget.org/docs/Creating-Packages/Creating-and-Publishing-a-Package#From_a_project
36+
37+
<OverPackInputFile Condition="'$(OverPackInputFile)' == ''">$(ProjectDir)$(TargetName).nuspec</OverPackInputFile>
38+
Creates a NuGet package from a NuSpec manifest file. Note that replacement
39+
tokens are NOT supported.
40+
http://docs.nuget.org/docs/reference/nuspec-reference
41+
42+
<OverPackSolutionDir Condition="'$(OverPackSolutionDir)' == ''">$(SolutionDir)</OverPackSolutionDir>
43+
<OverPackProjectPath Condition="'$(OverPackProjectPath)' == ''">$(ProjectPath)</OverPackProjectPath>
44+
The above properties should not be overridden unless you REALLY have a
45+
good reason to do so. Also, these properties most definitly should NOT
46+
be specified in a TFS build definition because they would apply to all
47+
projects in a solution file.
48+
49+
<OverPackOutputDirectory Condition="'$(OverPackOutputDirectory)' == ''">$(TargetDir)</OverPackOutputDirectory>
50+
Specifies the directory where to place the newly created NuGet package
51+
file. The default specifies the build output directory.
52+
53+
<OverPackBasePath Condition="'$(OverPackBasePath)' == ''">$(TargetDir)</OverPackBasePath>
54+
The base path of the files defined in the nuspec file. If not specified,
55+
uses the build output directory. For any files to be properly included
56+
in the NuGet package, make sure to set the 'Copy to Output Directory'
57+
property to anything other than 'Do not copy'.
58+
59+
<OverPackVersion Condition="'$(OverPackVersion)' == ''"></OverPackVersion>
60+
Overrides the version number for the NuGet package. If not specified,
61+
uses the version from the project or nuspec file.
62+
63+
<OverPackExclude Condition="'$(OverPackExclude)' == ''"></OverPackExclude>
64+
Specifies one or more wildcard patterns to exclude when creating the
65+
NuGet package. Separate multiple entries with a semicolon ';'.
66+
67+
<OverPackSymbols Condition="'$(OverPackSymbols)' == ''">false</OverPackSymbols>
68+
Determines if a NuGet package containing sources and symbols should be
69+
created. When specified with a nuspec, creates a regular NuGet package
70+
file and the corresponding symbols package.
71+
72+
<OverPackTool Condition="'$(OverPackTool)' == ''">false</OverPackTool>
73+
Determines if the output files of the project should be in the tool folder.
74+
75+
<OverPackNoDefaultExcludes Condition="'$(OverPackNoDefaultExcludes)' == ''">false</OverPackNoDefaultExcludes>
76+
Prevent default exclusion of NuGet package files and files and folders
77+
starting with a dot e.g. .svn.
78+
79+
<OverPackNoPackageAnalysis Condition="'$(OverPackNoPackageAnalysis)' == ''">false</OverPackNoPackageAnalysis>
80+
Specifies if the command should not run package analysis after building
81+
the NuGet package.
82+
83+
<OverPackIncludeReferencedProjects Condition="'$(OverPackIncludeReferencedProjects)' == ''">false</OverPackIncludeReferencedProjects>
84+
Include referenced projects either as dependencies or as part of the package.
85+
If a referenced project has a corresponding nuspec file that has the same
86+
name as the project, then that referenced project is added as a dependency.
87+
Otherwise, the referenced project is added as part of the NuGet package.
88+
89+
<OverPackExcludeEmptyDirectories Condition="'$(OverPackExcludeEmptyDirectories)' == ''">false</OverPackExcludeEmptyDirectories>
90+
Prevents inclusion of empty directories when building the NuGet package.
91+
92+
<OverPackVerbosity Condition="'$(OverPackVerbosity)' == ''">detailed</OverPackVerbosity>
93+
Specifies the amount of details to show from the command output: normal,
94+
quiet, detailed. This property is used for both the 'pack' and 'push'
95+
NuGet commands.
96+
97+
<OverPackMinClientVersion Condition="'$(OverPackMinClientVersion)' == ''"></OverPackMinClientVersion>
98+
Specifies the minClientVersion attribute for the created package. This
99+
value will override the value of the existing minClientVersion attribute
100+
(if any) in the .nuspec file.
101+
102+
<OverPackExtraArguments Condition="'$(OverPackExtraArguments)' == ''"></OverPackExtraArguments>
103+
Specifies any additional arguments to pass to NuGet when invoking the 'pack' command.
104+
105+
NuGet Push Command:
106+
http://docs.nuget.org/docs/Reference/Command-Line-Reference#Push_Command
107+
108+
<OverPackPublishToFolder Condition="'$(OverPackPublishToFolder)' == ''"></OverPackPublishToFolder>
109+
Specifies the UNC/folder location where to publish the package to. If not
110+
specified, the default uses $(TF_BUILD_BINARIESDIRECTORY) for TFS builds.
111+
http://msdn.microsoft.com/en-us/library/hh850448.aspx
112+
113+
<OverPackPublishToHttp Condition="'$(OverPackPublishToHttp)' == ''"></OverPackPublishToHttp>
114+
Specifies the server URL where to publish the package to. If not specified,
115+
nuget.org is used unless DefaultPushSource config value is set in the
116+
NuGet config file.
117+
118+
<OverPackPublishApiKey Condition="'$(OverPackPublishApiKey)' == ''"></OverPackPublishApiKey>
119+
Specifies the API key for the publishing server.
120+
121+
<OverPackPublishConfigFile Condition="'$(OverPackPublishConfigFile)' == ''"></OverPackPublishConfigFile>
122+
Specifies the NuGet configuation file. If not specified, %AppData%\NuGet\NuGet.config
123+
is used as the configuration file.
124+
125+
<OverPackPublishArguments Condition="'$(OverPackPublishArguments)' == ''"></OverPackPublishArguments>
126+
Specifies any additional arguments to pass to NuGet when invoking the 'push' command.
127+
128+
-->
129+
</PropertyGroup>
130+
</Project>

Diff for: WLog.Clients.Log4Net/Properties/AssemblyInfo.cs

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// Le informazioni generali relative a un assembly sono controllate dal seguente
6+
// set di attributi. Modificare i valori di questi attributi per modificare le informazioni
7+
// associate a un assembly.
8+
[assembly: AssemblyTitle("WLog.Clients.Log4Net")]
9+
[assembly: AssemblyDescription("Log4net implementation of WLOG logger")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("Arduosoft - https://github.com/arduosoft/wlog")]
12+
[assembly: AssemblyProduct("WLog.Clients.Log4Net")]
13+
[assembly: AssemblyCopyright("Copyright © 2016")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Se si imposta ComVisible su false, i tipi in questo assembly non saranno visibili
18+
// ai componenti COM. Se è necessario accedere a un tipo in questo assembly da
19+
// COM, impostare su true l'attributo ComVisible per tale tipo.
20+
[assembly: ComVisible(false)]
21+
22+
// Se il progetto viene esposto a COM, il GUID seguente verrà utilizzato come ID della libreria dei tipi
23+
[assembly: Guid("3f2b62ed-a3b2-4137-9033-266be27d8d1d")]
24+
25+
// Le informazioni sulla versione di un assembly sono costituite dai seguenti quattro valori:
26+
//
27+
// Versione principale
28+
// Versione secondaria
29+
// Numero di build
30+
// Revisione
31+
//
32+
// È possibile specificare tutti i valori oppure impostare valori predefiniti per i numeri relativi alla revisione e alla build
33+
// usando l'asterisco '*' come illustrato di seguito:
34+
// [assembly: AssemblyVersion("1.0.*")]
35+
[assembly: AssemblyVersion("1.0.0.0")]
36+
[assembly: AssemblyFileVersion("1.0.0.0")]

Diff for: WLog.Clients.Log4Net/WebAppender.cs

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using log4net.Appender;
2+
using log4net.Core;
3+
using Newtonsoft.Json;
4+
using System;
5+
using System.Collections.Generic;
6+
using System.Linq;
7+
using System.Text;
8+
using System.Threading.Tasks;
9+
using Wlog.Clients.Classes;
10+
using Wlog.Clients.Helpers;
11+
12+
namespace Wlog.Clients.Log4Net
13+
{
14+
public class WebAppender : AppenderSkeleton
15+
{
16+
public string Destination { get; set; }
17+
public string ApplicationKey { get; set; }
18+
19+
public WebAppender()
20+
{
21+
this.Name = "WebAppender";
22+
}
23+
protected override void Append(LoggingEvent loggingEvent)
24+
{
25+
string logMessage = loggingEvent.RenderedMessage;
26+
27+
LogMessage entry = new LogMessage();
28+
entry.Message = logMessage;
29+
entry.SourceDate = loggingEvent.TimeStamp;
30+
entry.ApplicationKey = ApplicationKey;
31+
entry.Level = loggingEvent.Level.ToString();
32+
33+
LogHelper.DoRequest(Destination, JsonConvert.SerializeObject(new LogMessage[] { entry }));
34+
}
35+
}
36+
}

Diff for: WLog.Clients.Log4Net/Wlog.Clients.Log4Net.csproj

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{3F2B62ED-A3B2-4137-9033-266BE27D8D1D}</ProjectGuid>
8+
<OutputType>Library</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>Wlog.Clients.Log4Net</RootNamespace>
11+
<AssemblyName>Wlog.Clients.Log4Net</AssemblyName>
12+
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
<NuGetPackageImportStamp>
15+
</NuGetPackageImportStamp>
16+
</PropertyGroup>
17+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
18+
<DebugSymbols>true</DebugSymbols>
19+
<DebugType>full</DebugType>
20+
<Optimize>false</Optimize>
21+
<OutputPath>bin\Debug\</OutputPath>
22+
<DefineConstants>DEBUG;TRACE</DefineConstants>
23+
<ErrorReport>prompt</ErrorReport>
24+
<WarningLevel>4</WarningLevel>
25+
</PropertyGroup>
26+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
27+
<DebugType>pdbonly</DebugType>
28+
<Optimize>true</Optimize>
29+
<OutputPath>bin\Release\</OutputPath>
30+
<DefineConstants>TRACE</DefineConstants>
31+
<ErrorReport>prompt</ErrorReport>
32+
<WarningLevel>4</WarningLevel>
33+
</PropertyGroup>
34+
<ItemGroup>
35+
<Reference Include="log4net, Version=1.2.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
36+
<HintPath>..\packages\log4net.2.0.5\lib\net45-full\log4net.dll</HintPath>
37+
<Private>True</Private>
38+
</Reference>
39+
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
40+
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
41+
<Private>True</Private>
42+
</Reference>
43+
<Reference Include="System" />
44+
<Reference Include="System.Core" />
45+
<Reference Include="System.Xml.Linq" />
46+
<Reference Include="System.Data.DataSetExtensions" />
47+
<Reference Include="Microsoft.CSharp" />
48+
<Reference Include="System.Data" />
49+
<Reference Include="System.Net.Http" />
50+
<Reference Include="System.Xml" />
51+
</ItemGroup>
52+
<ItemGroup>
53+
<Compile Include="BufferedWebAppender.cs" />
54+
<Compile Include="Properties\AssemblyInfo.cs" />
55+
<Compile Include="WebAppender.cs" />
56+
</ItemGroup>
57+
<ItemGroup>
58+
<None Include="OvermanGroup.NuGet.Packager.props" />
59+
<None Include="packages.config" />
60+
<None Include="Wlog.Clients.Log4Net.nuspec" />
61+
</ItemGroup>
62+
<ItemGroup>
63+
<ProjectReference Include="..\Wlog.Clients\Wlog.Clients.csproj">
64+
<Project>{c3f67dfe-914a-4852-9eae-82b401ab70cb}</Project>
65+
<Name>Wlog.Clients</Name>
66+
</ProjectReference>
67+
</ItemGroup>
68+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
69+
<Import Project="..\packages\OvermanGroup.NuGet.Packager.1.2.0\build\OvermanGroup.NuGet.Packager.targets" Condition="Exists('..\packages\OvermanGroup.NuGet.Packager.1.2.0\build\OvermanGroup.NuGet.Packager.targets')" />
70+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
71+
<PropertyGroup>
72+
<ErrorText>Questo progetto fa riferimento a uno o più pacchetti NuGet che non sono presenti in questo computer. Usare lo strumento di ripristino dei pacchetti NuGet per scaricarli. Per altre informazioni, vedere http://go.microsoft.com/fwlink/?LinkID=322105. Il file mancante è {0}.</ErrorText>
73+
</PropertyGroup>
74+
<Error Condition="!Exists('..\packages\OvermanGroup.NuGet.Packager.1.2.0\build\OvermanGroup.NuGet.Packager.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\OvermanGroup.NuGet.Packager.1.2.0\build\OvermanGroup.NuGet.Packager.targets'))" />
75+
</Target>
76+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
77+
Other similar extension points exist, see Microsoft.Common.targets.
78+
<Target Name="BeforeBuild">
79+
</Target>
80+
<Target Name="AfterBuild">
81+
</Target>
82+
-->
83+
</Project>

0 commit comments

Comments
 (0)