/Xtensive.Core/Xtensive.Core/Log.cs
https://code.google.com/p/dataobjectsdotnet/ · C# · 29 lines · 14 code · 3 blank · 12 comment · 0 complexity · 66bfe2f7a2d7b9dfb5935175c368a4f9 MD5 · raw file
- // Copyright (C) 2003-2010 Xtensive LLC.
- // All rights reserved.
- // For conditions of distribution and use, see license.
- // Created by: Alex Yakunin
- // Created: 2007.10.10
-
- using System.Reflection;
- using Xtensive.Core.Diagnostics;
-
- namespace Xtensive.Core
- {
- /// <summary>
- /// Log for this namespace.
- /// </summary>
- internal sealed class Log: LogTemplate<Log>
- {
- // Copy-paste this code!
- /// <summary>
- /// Log name.
- /// </summary>
- public static readonly string Name;
-
- static Log()
- {
- string className = MethodInfo.GetCurrentMethod().DeclaringType.FullName;
- Name = className.Substring(0, className.LastIndexOf('.'));
- }
- }
- }