示例#1
0
        private static void ConfigureLoggly(ExecutionEnvironment environment, LoggingConfiguration configuration)
        {
            if (environment.IsLocalOrTest())
            {
                return;
            }

            ILogglyConfig config = LogglyConfig.Instance;

            config.CustomerToken = configuration.LogglyToken;
            config.Transport.EndpointHostname = "logs-01.loggly.com";
            config.Transport.EndpointPort     = 443;
            config.Transport.LogTransport     = LogTransport.Https;
        }
示例#2
0
        private static void SetupLogglyConfiguration(LogglySettings logglySettings)
        {
            ILogglyConfig config = LogglyConfig.Instance;

            config.CustomerToken   = logglySettings.CustomerToken;
            config.ApplicationName = logglySettings.ApplicationName;
            config.Transport       = new TransportConfiguration()
            {
                EndpointHostname = logglySettings.EndpointHostname,
                EndpointPort     = logglySettings.EndpointPort,
                LogTransport     = logglySettings.LogTransport
            };
            config.ThrowExceptions = logglySettings.ThrowExceptions;
            config.TagConfig.Tags.AddRange(new ITag[] {
                new ApplicationNameTag {
                    Formatter = "Application-{0}"
                },
                new HostnameTag {
                    Formatter = "Host-{0}"
                }
            });
        }