コード例 #1
0
ファイル: CommonApplicationLogic.cs プロジェクト: mjaric/nfx
        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
            }
                        );
        }
コード例 #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)));
        }