Ejemplo n.º 1
0
        /// <summary>
        /// Logs to the ULS.
        /// </summary>
        /// <param name="categoryId"></param>
        /// <param name="traceSeverity">The trace severity.</param>
        /// <param name="message">The message.</param>
        /// <param name="args">The message arguments.</param>
        protected virtual void InnerLog(CategoryId categoryId, TraceSeverity traceSeverity, string message, params object[] args)
        {
            //SPSecurity.RunWithElevatedPrivileges(
            //    () =>
            //    {
            if (_innerLogger == null)
            {
                _innerLogger = new InnerLogger(Name);
            }

            SPDiagnosticsCategory category =
                _innerLogger.Areas[_innerLogger.Name].Categories[categoryId.ToString()];

            _innerLogger.WriteTrace(0, category, traceSeverity, message, args);
            //});
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Logs to the ULS.
        /// </summary>
        /// <param name="categoryId"></param>
        /// <param name="traceSeverity">The trace severity.</param>
        /// <param name="message">The message.</param>
        /// <param name="args">The message arguments.</param>
        protected virtual void InnerLog(CategoryId categoryId, TraceSeverity traceSeverity, string message, params object[] args)
        {
            //SPSecurity.RunWithElevatedPrivileges(
            //    () =>
            //    {
            if (_innerLogger == null)
            {
                _innerLogger = new InnerLogger(Name);
            }

            SPDiagnosticsCategory category =
                _innerLogger.Areas[_innerLogger.Name].Categories[categoryId.ToString()];
            _innerLogger.WriteTrace(0, category, traceSeverity, message, args);
            //});
        }