You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-dev@logging.apache.org by "Stefan Bodewig (JIRA)" <ji...@apache.org> on 2013/10/08 16:18:42 UTC

[jira] [Commented] (LOG4NET-358) Visual Studio snippet within the deployment with NuGet

    [ https://issues.apache.org/jira/browse/LOG4NET-358?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13789236#comment-13789236 ] 

Stefan Bodewig commented on LOG4NET-358:
----------------------------------------

see also http://blog.cincura.net/233419-log4net-nuget-package-updated-without-some-goodies/ and https://github.com/cincuranet/log4net-nuget

If the issue persists, I'd encourage you to open an issue at github

> 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)