Example #1
0
 public AliyunSLSLogger(string name, AliyunSLSOptions options)
 {
     this.name = string.IsNullOrEmpty(name) ? nameof(AliyunSLSLogger) : name;
     if (options == null)
     {
         throw new ArgumentNullException(nameof(options));
     }
     logger = new AliyunSlsBuilder(options, this.name);
 }
Example #2
0
 public AliyunSlsBuilder(AliyunSLSOptions configModel, string name)
 {
     options   = configModel ?? throw new ArgumentNullException(nameof(configModel));
     this.name = name;
     Client    = LogServiceClientBuilders.HttpBuilder
                 .Endpoint(options.Endpoint, options.ProjectName)
                 .Credential(options.AccessKey, options.AccessSecret)
                 .RequestTimeout(10000)
                 .Build();
 }
Example #3
0
 public AliyunSLSProvider(AliyunSLSOptions options)
 {
     this.options = options;
 }
Example #4
0
 public void Dispose()
 {
     Client  = null;
     options = null;
 }