示例#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);
 }
示例#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();
 }
示例#3
0
 public AliyunSLSProvider(AliyunSLSOptions options)
 {
     this.options = options;
 }
示例#4
0
 public void Dispose()
 {
     Client  = null;
     options = null;
 }