/// <summary>
        /// Release all resources
        /// </summary>
        /// <param name="disposing">Indicates user or GC calling this function</param>
        protected virtual void Dispose(bool disposing)
        {
            if (!this.disposed)
            {
                if (disposing)
                {
                    if (logThread != null)
                    {
                        logThread.Dispose();
                        logThread = null;
                    }
                    if (logMsgList != null)
                    {
                        logMsgList.Dispose();
                        logMsgList = null;
                    }
                    if (this.logDistinationMap != null)
                    {
                        foreach (ILogDistination distination in this.logDistinationMap.Values)
                        {
                            distination.Dispose();
                        }
                    }
                }

                //Note disposing has been done.
                this.disposed = true;
            }
        }
        /// <summary>
        /// Initialize the LogManagement with the specified fileName
        /// </summary>
        /// <param name="fileName">The file name</param>
        public void Initialize(string fileName)
        {
            // to prevent multiply initialize
            if (this.site != null)
            {
                return;
            }

            this.site = new StackSdkTestSite(fileName);

            loggerList        = new List <Logger>();
            logMsgList        = new QueueManager();
            logDistinationMap = new Dictionary <LogType, ILogDistination>();
            logThread         = new LogThread();
        }