Ejemplo n.º 1
0
        public bool StartAPILogging(string cacheID, string InstanceID, bool version)
        {
            if (cacheID != null)
            {
                try
                {
                    _forcefullStoppedLogging = false;
                    if (_apiLogger == null)
                    {
                        APILogger = new APIServerLogger();
                    }
                    APILogger.AddInstanceInformation(InstanceID.ToLower());

                    if (APILogging.APILogManager.APILogManger == null && APILogger != null && !APILogger.IsLoggingEnabled(InstanceID.ToLower()))
                    {
                        APILogging.APILogManager logmanger = new APILogging.APILogManager();
                        logmanger.StartLogging(cacheID, version);
                        APILogging.APILogManager.APILogManger = logmanger;
                        AppUtil.LogEvent("API logging sucessfully started on cache " + cacheID, EventLogEntryType.Information);
                        return(true);
                    }
                    else
                    {
                        return(APILogManager.EnableLogging);
                    }
                }
                catch
                {
                    return(false);
                }
            }
            return(false);
        }
Ejemplo n.º 2
0
 public void StartLogging(string cacheID, bool version)
 {
     try
     {
         _enableLogging   = true;
         IsVersionMatched = version;
         s_logmanager     = new APILogManager();
         _index           = new SlidingIndex <Alachisoft.NCache.Common.Monitoring.APILogging.APIRuntimeLogItem>(2, true);
     }
     catch
     {
     }
 }