コード例 #1
0
        public DurableSeqSink(
            string serverUrl,
            string bufferBaseFilename,
            string apiKey,
            int batchPostingLimit,
            TimeSpan period,
            long? bufferFileSizeLimitBytes,
            long? eventBodyLimitBytes,
            LoggingLevelSwitch levelControlSwitch,
            HttpMessageHandler messageHandler,
            long? retainedInvalidPayloadsLimitBytes)
        {
            if (serverUrl == null) throw new ArgumentNullException(nameof(serverUrl));
            if (bufferBaseFilename == null) throw new ArgumentNullException(nameof(bufferBaseFilename));

            _shipper = new HttpLogShipper(
                serverUrl, 
                bufferBaseFilename, 
                apiKey, 
                batchPostingLimit, 
                period, 
                eventBodyLimitBytes, 
                levelControlSwitch,
                messageHandler,
                retainedInvalidPayloadsLimitBytes);

            _sink = new RollingFileSink(
                bufferBaseFilename + "-{Date}.json",
                new RawJsonFormatter(),
                bufferFileSizeLimitBytes,
                null);
        }
コード例 #2
0
        public DurableSeqSink(string serverUrl, string bufferBaseFilename, string apiKey, int batchPostingLimit, TimeSpan period, long? bufferFileSizeLimitBytes)
        {
            if (serverUrl == null) throw new ArgumentNullException("serverUrl");
            if (bufferBaseFilename == null) throw new ArgumentNullException("bufferBaseFilename");

            _shipper = new HttpLogShipper(serverUrl, bufferBaseFilename, apiKey, batchPostingLimit, period);
            _sink = new RollingFileSink(
                bufferBaseFilename + "-{Date}.json",
                new JsonFormatter(),
                bufferFileSizeLimitBytes,
                null);
        }
コード例 #3
0
ファイル: DurableSeqSink.cs プロジェクト: tetious/serilog
        public DurableSeqSink(string serverUrl, string bufferBaseFilename, string apiKey, int batchPostingLimit, TimeSpan period, long?bufferFileSizeLimitBytes)
        {
            if (serverUrl == null)
            {
                throw new ArgumentNullException("serverUrl");
            }
            if (bufferBaseFilename == null)
            {
                throw new ArgumentNullException("bufferBaseFilename");
            }

            _shipper = new HttpLogShipper(serverUrl, bufferBaseFilename, apiKey, batchPostingLimit, period);
            _sink    = new RollingFileSink(
                bufferBaseFilename + "-{Date}.json",
                new JsonFormatter(),
                bufferFileSizeLimitBytes,
                null);
        }
コード例 #4
0
        public DurableSeqSink(
            string serverUrl,
            string bufferBaseFilename,
            string apiKey,
            int batchPostingLimit,
            TimeSpan period,
            long?bufferFileSizeLimitBytes,
            long?eventBodyLimitBytes,
            LoggingLevelSwitch levelControlSwitch,
            HttpMessageHandler messageHandler,
            long?retainedInvalidPayloadsLimitBytes)
        {
            if (serverUrl == null)
            {
                throw new ArgumentNullException(nameof(serverUrl));
            }
            if (bufferBaseFilename == null)
            {
                throw new ArgumentNullException(nameof(bufferBaseFilename));
            }

            _shipper = new HttpLogShipper(
                serverUrl,
                bufferBaseFilename,
                apiKey,
                batchPostingLimit,
                period,
                eventBodyLimitBytes,
                levelControlSwitch,
                messageHandler,
                retainedInvalidPayloadsLimitBytes);

            _sink = new RollingFileSink(
                bufferBaseFilename + "-{Date}.json",
                new RawJsonFormatter(),
                bufferFileSizeLimitBytes,
                null,
                encoding: Encoding.UTF8);
        }