Skip to content

Hungs up the whole program #1

@tomasr78

Description

@tomasr78

The LogDNA factory implementation is not usable in real time application because if LogDNA server is unreachable the implementation do not time outs!

    public static class Logger
    {
        private static ILoggerFactory _factory;

        public static void ConfigureLogger(ILoggerFactory factory)
        {            
            //Ignore exceptions while serializing
            JsonConvert.DefaultSettings = () => new JsonSerializerSettings
            {
                Error = (serializer, err) => { err.ErrorContext.Handled = true; }
            };

            try
            {
                //ToDo Here is the problem, AddLogDNA method halts execution and never time outs!
                factory.AddLogDNA(new LogDNAOptions("digestion-key")
                {
                    HostName = AppConstants.ServerName,
                    LogLevel = LogLevel.Debug
                });
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions