Ejemplo n.º 1
0
    public LogInformation(UnityEngine.Object origin, string channel, LogLevel level, List <LogStackFrame> stackFrameList,
                          LogStackFrame logStackFrame, object message, params object[] paramsObject)
    {
        OriginObject   = origin;
        Channel        = channel;
        LogLevel       = level;
        StackFrameList = stackFrameList;
        var formatMessage = message as String;

        if (formatMessage != null)
        {
            if (paramsObject.Length > 0)
            {
                Message = System.String.Format(formatMessage, paramsObject);
            }
            else
            {
                Message = formatMessage;
            }
        }
        else
        {
            if (message != null)
            {
                Message = message.ToString();
            }
        }
        RelativeTimeLine = XLogger.GetRelativeTime();
        OriginStackFrame = logStackFrame;
    }