SenseNet.DirectoryServices.AdLog.Log C# (CSharp) Метод

Log() публичный статический Метод

public static Log ( string msg ) : void
msg string
Результат void
        public static void Log(string msg)
        {
            LogLine(string.Format("       {0}", msg), EventType.Verbose);
        }
        public static void LogOuter(string msg)

Usage Example

Пример #1
0
        // delete portal objects that have no corresponding synchronized objects in AD
        private void DeleteObjectsFromAD(SyncTree syncTree,
                                         ADObjectType objType,
                                         SearchResultCollection allADObjects,
                                         Action <Node> DeletePortalObject)
        {
            try
            {
                AdLog.LogOuter("Querying all portal objects...");
                var portalNodes = GetAllPortalObjects(objType, syncTree);
                AdLog.LogOuter("Checking if portal objects exist under synchronized path in AD...");
                foreach (Node node in portalNodes)
                {
                    try
                    {
                        // check if object exists under synchronized path in AD
                        var guid = Common.GetPortalObjectGuid(node);
                        if ((!guid.HasValue) || (!ADObjectPathSynced((Guid)guid, allADObjects, node)))
                        {
                            if (!guid.HasValue)
                            {
                                AdLog.Log(string.Format("No guid set for portal object: {0} ", node.Path));
                            }

                            // deleted from AD or not under synchronized path any more
                            DeletePortalObject(node);
                        }
                    }
                    catch (Exception ex)
                    {
                        AdLog.LogException(ex);
                    }
                }
            }
            catch (Exception ex)
            {
                AdLog.LogException(ex);
            }
        }
All Usage Examples Of SenseNet.DirectoryServices.AdLog::Log