using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Text;
namespace Sarand.Net.Standard.Base.Utils
{
//=======================================================================
public static class LoggingUtils
{
//-------------------------------------------------------------------
// M e t h o d N a m e
//-------------------------------------------------------------------
/*
[MethodImpl(MethodImplOptions.NoInlining)]
public static string GetMyMethodName ()
{
var st = new StackTrace(new StackFrame(1));
return st.GetFrame(0).GetMethod().Name;
}
*/
//-------------------------------------------------------------------
// L o g g i n g P r e f i x
//-------------------------------------------------------------------
///
/// Format logging prefix from class and function names.
/// '<class>.<function>'
///
public static String GetFn (this Object obj, String function)
{
return GetFn(obj.GetType(), function);
}
///
/// Format logging prefix from class and function names.
/// '<class>.<function>'
///
public static String GetFn (this Type type, String function)
{
return type.Name + "." + function;
}
//-------------------------------------------------------------------
}
//=======================================================================
}