Skip to content

Instantly share code, notes, and snippets.

@derantell
Last active August 22, 2016 16:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save derantell/127e6beae75d6cd11f6f4ff91bfb198a to your computer and use it in GitHub Desktop.
Save derantell/127e6beae75d6cd11f6f4ff91bfb198a to your computer and use it in GitHub Desktop.
Visual studio snippet for EPiServer log field
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets
xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>EPiServer class logger</Title>
<Description>Adds a static EPiServer Log logger field</Description>
<Shortcut>log</Shortcut>
</Header>
<Snippet>
<Imports>
<Import>
<Namespace>EPiServer.Logging.Compatibility</Namespace>
</Import>
</Imports>
<References>
<Reference>
<Assembly>EPiServer.Framework.dll</Assembly>
</Reference>
</References>
<Declarations>
<Literal Editable="false">
<ID>classname</ID>
<ToolTip>Class name</ToolTip>
<Function>ClassName()</Function>
<Default>ParentClass</Default>
</Literal>
</Declarations>
<Code Language="CSharp">
<![CDATA[private static ILog Log = LogManager.GetLogger(typeof($classname$));]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment