[
https://issues.apache.org/jira/browse/LOG4NET-358?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stefan Bodewig reopened LOG4NET-358:
------------------------------------
> Visual Studio snippet within the deployment with NuGet
> ------------------------------------------------------
>
> Key: LOG4NET-358
> URL: https://issues.apache.org/jira/browse/LOG4NET-358
> Project: Log4net
> Issue Type: Wish
> Components: Builds
> Environment: Visual Studio deployment with NuGet
> Reporter: Luciano
> Priority: Minor
> Labels: deployment, log4net, nuget
>
> The deployment with NuGet for Visual Studio could installs also a snippet
> which could be used to declare a private static reference to logger
> "log4net.ILog". So, after installed the log4net via NuGet, we could just go
> to any class and type log<TAB> and a full and auto declaration appears
> referencing the enclosure type.
> Following is a snippet I use today with C#, but needs to be installed apart
> on each Visual Studio installation. The main piece of the snippet is the
> declaration: private static readonly log4net.ILog log =
> log4net.LogManager.GetLogger(typeof($classname$));
> SNIPPET DECLARATION:
> <?xml version="1.0" encoding="utf-8"?>
> <CodeSnippets
> xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
> <CodeSnippet Format="1.0.0">
> <Header>
> <SnippetTypes>
> <SnippetType>Expansion</SnippetType>
> </SnippetTypes>
> <Title>log4net - Declaration</Title>
> <Author>Luciano</Author>
> <Description>
> </Description>
> <HelpUrl>
> </HelpUrl>
> <Shortcut>log
> </Shortcut>
> </Header>
> <Snippet>
> <References>
> <Reference>
> <Assembly>log4net.dll</Assembly>
> </Reference>
> </References>
> <Declarations>
> <Literal Editable="true">
> <ID>classname</ID>
> <ToolTip>
> </ToolTip>
> <Function>
> ClassName()
> </Function>
> </Literal>
> </Declarations>
> <Code Language="csharp">
> <![CDATA[private static readonly log4net.ILog log =
> log4net.LogManager.GetLogger(typeof($classname$));]]>
> </Code>
> </Snippet>
> </CodeSnippet>
> </CodeSnippets>
--
This message was sent by Atlassian JIRA
(v6.1#6144)