Ejemplo n.º 1
0
        private static ILogWriter GetWriter()
        {
            try
            {
                if (_writer == null)
                {
                    _writer = new PendingLogWriter();
                }

                var inheritedWriter = _writer.InheritWriter();
                if (inheritedWriter != null)
                {
                    _writer = inheritedWriter;
                }
            }
            catch (Exception e)
            {
                if (MyAPIGateway.Utilities != null)
                {
                    MyAPIGateway.Utilities.ShowNotification("Unable to write into log file due to '" + e.Message + "'");
                }

                _writer = new PendingLogWriter();
            }

            return(_writer);
        }