Ejemplo n.º 1
0
        public void Dispose()
        {
            lock (LockObject)
            {
                if (m_bLineShift)
                {
                    LogWriter?.Write(GenerateLogBackLine(m_eLevel));
                    Log.Iteration--;
                }

                if (Log.Iteration >= 0)
                {
                    FullNameStack.RemoveAt(Log.Iteration);
                }
            }
        }
Ejemplo n.º 2
0
        public Log(object a_oParentObject, string a_sFuncName, LevelEnum a_eLevel)
        {
            lock (LockObject)
            {
                m_sClassName = (a_oParentObject is string?a_oParentObject.ToString() : a_oParentObject.GetType().Name.CleanType());
                m_sFuncName  = a_sFuncName;

                FullNameStack.Add(FullName);

                if (a_eLevel <= CurrentLevel)
                {
                    m_bLineShift = true;

                    m_eLevel = a_eLevel;
                    Log.Iteration++;

                    Print($"[{FullName}]", true, a_eLevel);
                }
            }
        }