/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

  1. // Copyright (C) 2003-2010 Xtensive LLC.
  2. // All rights reserved.
  3. // For conditions of distribution and use, see license.
  4. // Created by: Alex Yakunin
  5. // Created: 2007.10.10
  6. using System.Reflection;
  7. using Xtensive.Core.Diagnostics;
  8. namespace Xtensive.Core
  9. {
  10. /// <summary>
  11. /// Log for this namespace.
  12. /// </summary>
  13. internal sealed class Log: LogTemplate<Log>
  14. {
  15. // Copy-paste this code!
  16. /// <summary>
  17. /// Log name.
  18. /// </summary>
  19. public static readonly string Name;
  20. static Log()
  21. {
  22. string className = MethodInfo.GetCurrentMethod().DeclaringType.FullName;
  23. Name = className.Substring(0, className.LastIndexOf('.'));
  24. }
  25. }
  26. }