コード例 #1
0
ファイル: NLogLogger.cs プロジェクト: Joan54/TreeView
        /// <summary>
        ///     The specified message is of type Info.
        /// </summary>
        /// <param name="message">The message.</param>
        /// <param name="nameSpace">The name space.</param>
        /// <param name="sourceFilePath">The source file path.</param>
        /// <param name="sourceLineNumber">The source line number.</param>
        public void Info(string message, string nameSpace, string sourceFilePath = "", int sourceLineNumber = 0)
        {
            if (string.IsNullOrEmpty(nameSpace))
            {
                nameSpace = _nameSpace;
            }

            string header = MsgHeader(nameSpace, sourceFilePath, sourceLineNumber);

            _innerLogger?.Info($"{header}{message}");
        }