Skip to content

Commit

Permalink
Added NuGet package setup and updated to Loupe 4.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
kendallmiller committed Sep 1, 2015
1 parent 7b111c7 commit aeb82fe
Show file tree
Hide file tree
Showing 9 changed files with 78 additions and 13 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -78,8 +78,9 @@ publish
# Publish Web Output
*.Publish.xml

# NuGet Packages Directory
# NuGet Related
packages
*.nupkg

# Windows Azure Build Output
csx
Expand Down
3 changes: 2 additions & 1 deletion Agent.NLog2.sln
@@ -1,14 +1,15 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.31101.0
VisualStudioVersion = 12.0.40629.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NLogTest", "src\NLogTest\NLogTest.csproj", "{A289FA07-A56B-4A81-AC75-E142E7A29976}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Agent.NLog2", "src\Agent.NLog2\Agent.NLog2.csproj", "{AA3FC450-1152-4FA7-BB7F-E878B1C15D6D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Dependencies", "Dependencies", "{B021ADBF-C603-473F-AA2A-1B1F4BDFB6A1}"
ProjectSection(SolutionItems) = preProject
dependencies\NuGet.exe = dependencies\NuGet.exe
README.md = README.md
EndProjectSection
EndProject
Expand Down
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -13,7 +13,7 @@ Adapting your .NET Application's NLog logging to include Loupe
To convert your .NET application's existing use of the NLog logging framework to include Loupe you need:

* (recommended) Download and install the latest version of Loupe Desktop to view the logs
* The Agent.NLog project containing the class file: GibraltarTarget.cs
* The Loupe Agent for NLog from NuGet or the Agent.NLog project containing the class file: GibraltarTarget.cs
* Your NLog configuration file (app.config, NLog.config, NLog.dll.nlog, etc),
or source code if programmatic configuration is used.

Expand All @@ -23,10 +23,10 @@ To add this Gibraltar.Agent.NLog library to your solution or build process
1. Check that the Reference to the NLog library points to where you have it on your system or build process. If needed,
either add the correct reference and delete the broken one, or else edit the project file directly and correct the path.
2. Confirm that the Reference to the Loupe Agent (Gibraltar.Agent) is valid, or correct it. It's highly
recommend you use NuGet to get the latest Loupe Agent.
recommend you use NuGet to get the latest Loupe Agent.
3. Build this project and either add this project to your application as a dependency or copy the
Gibraltar.Agent.NLog.dll library it builds to wherever you keep external library dependencies.
4. Also include the Gibraltar.Agent.dll and Gibraltar.Packager.exe in your distribution and installation in the
4. Also include the Gibraltar.Agent.dll in your distribution and install in the
directory for your application executable.

Adjust your configuration to use the GibraltarTarget
Expand Down
11 changes: 9 additions & 2 deletions src/Agent.NLog2/Agent.NLog2.csproj
Expand Up @@ -41,8 +41,9 @@
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="Gibraltar.Agent">
<HintPath>..\..\packages\Gibraltar.Agent.3.7.0.2102\lib\2.0\Gibraltar.Agent.dll</HintPath>
<Reference Include="Gibraltar.Agent, Version=4.0.0.0, Culture=neutral, PublicKeyToken=ca42a1ee8d2e42d3, processorArchitecture=MSIL">
<HintPath>..\..\packages\Gibraltar.Agent.3.8.1.2710-beta\lib\net20\Gibraltar.Agent.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NLog">
<HintPath>..\..\packages\NLog.2.0.0.2000\lib\net20\NLog.dll</HintPath>
Expand All @@ -56,9 +57,15 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="content\app.config.transform" />
<None Include="content\web.config.transform" />
<None Include="Gibraltar.Agent.NLog2.nuspec" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>if $(ConfigurationName) == Release $(ProjectDir)..\..\dependencies\NuGet.exe Pack $(ProjectPath) -Prop Configuration=Release</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
20 changes: 20 additions & 0 deletions src/Agent.NLog2/Gibraltar.Agent.NLog2.nuspec
@@ -0,0 +1,20 @@
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>Gibraltar.Agent.NLog2</id>
<version>$version$-beta</version>
<title>Gibraltar Loupe Agent for NLog 2.0</title>
<authors>Gibraltar Software</authors>
<licenseUrl>http://www.gibraltarsoftware.com/Support/Loupe/Documentation/WebFrame.html#Reference_GibraltarAgentLicense.html</licenseUrl>
<projectUrl>http://www.gibraltarsoftware.com/External/Getting-Started-video.aspx</projectUrl>
<owners>Gibraltar Software</owners>
<iconUrl>http://www.gibraltarsoftware.com/loupe.ico</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>NLog is a powerful, flexible logging system available for all .NET platforms. It's a great choice when you need very sophisticated log gathering capabilities such as sending log messages from clients to servers, multiple logging levels used simultaneously in the application, and a range of other sophisticated features. This package enables NLog message to route into Loupe - a black box recorder for your application that can gather data from wherever your application is run and get it back to you, anywhere in the world.</description>
<summary>Connects NLog with Loupe - a black box recorder for your application that can gather data from wherever your application is run and get it back to you, anywhere in the world.</summary>
<tags>Loupe Logging</tags>
</metadata>
<files>
<file src="content\*.*" target="content" />
</files>
</package>
10 changes: 5 additions & 5 deletions src/Agent.NLog2/Properties/AssemblyInfo.cs
Expand Up @@ -8,9 +8,9 @@
[assembly: AssemblyTitle("NLog 2 Target")]
[assembly: AssemblyDescription("Extends Loupe Agent for NLog 2")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Gibraltar Software Inc.")]
[assembly: AssemblyCompany("Gibraltar Software, Inc.")]
[assembly: AssemblyProduct("Loupe")]
[assembly: AssemblyCopyright("Copyright © 2008-2014 Gibraltar Software Inc.")]
[assembly: AssemblyCopyright("Copyright © 2008-2015 Gibraltar Software, Inc.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -32,6 +32,6 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.5.4.0")]
[assembly: AssemblyFileVersion("3.0.0.0")]
[assembly: AssemblyInformationalVersionAttribute("3.0.0.0")]
[assembly: AssemblyVersion("4.0.0.0")]
[assembly: AssemblyFileVersion("3.8.1.2710")]
[assembly: AssemblyInformationalVersionAttribute("3.8.1.2710")]
18 changes: 18 additions & 0 deletions src/Agent.NLog2/content/app.config.transform
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog"/>
</configSections>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<extensions>
<add assembly="Gibraltar.Agent.NLog2" /> <!--Contains GibraltarTarget class marked as "Gibraltar" target type-->
</extensions>
<targets>
<target name="Gibraltar" xsi:type="Gibraltar" /> <!--Define a named target using the "Gibraltar" target type-->
</targets>
<rules>
<logger name="*" minlevel="Trace" writeTo="Gibraltar" /> <!--Send all logging to the "Gibraltar" named target-->
</rules>
</nlog>
</configuration>
18 changes: 18 additions & 0 deletions src/Agent.NLog2/content/web.config.transform
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog"/>
</configSections>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<extensions>
<add assembly="Gibraltar.Agent.NLog2" /> <!--Contains GibraltarTarget class marked as "Gibraltar" target type-->
</extensions>
<targets>
<target name="Gibraltar" xsi:type="Gibraltar" /> <!--Define a named target using the "Gibraltar" target type-->
</targets>
<rules>
<logger name="*" minlevel="Trace" writeTo="Gibraltar" /> <!--Send all logging to the "Gibraltar" named target-->
</rules>
</nlog>
</configuration>
2 changes: 1 addition & 1 deletion src/Agent.NLog2/packages.config
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Gibraltar.Agent" version="3.7.0.2102" targetFramework="net20" />
<package id="Gibraltar.Agent" version="3.8.1.2710-beta" targetFramework="net20" />
<package id="NLog" version="2.0.0.2000" />
</packages>

0 comments on commit aeb82fe

Please sign in to comment.