Beispiel #1
0
        public void WriteLog(MessageType type, string from, string msgText)
        {
            if (m_Log == null)
            {
                return;
            }

            m_Log.Write(new NFX.Log.Message()
            {
                Topic = LogTopic,
                Type  = type,
                From  = from,
                Text  = msgText
            }
                        );
        }
Beispiel #2
0
        protected void WriteLog(MessageType type,
                                string from,
                                string msgText,
                                Exception error = null,
                                [CallerFilePath] string file = "",
                                [CallerLineNumber] int line  = 0,
                                object pars = null)
        {
            if (m_Log == null)
            {
                return;
            }

            m_Log.Write(new NFX.Log.Message()
            {
                Topic     = CoreConsts.APPLICATION_TOPIC,
                Type      = type,
                From      = from,
                Text      = msgText,
                Exception = error,
            }.SetParamsAsObject(NFX.Log.Message.FormatCallerParams(pars, file, line)));
        }