Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
jose3m committed Oct 31, 2016
2 parents 665e366 + 60be7ca commit 6e4bb1b
Show file tree
Hide file tree
Showing 6 changed files with 257 additions and 114 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,10 @@ By default just errors information is stored.
The maximum size, in bytes, to which the error/debug file for the specifier will be allowed to grow.
By default no limit will be applied.

### ErrorRollingSpecifier
Rolling specifier: {Date}, {Hour} or {HalfHour}.
The default one is {Date}.

### ErrorStoreEvents
If set to 'true' then events related to any error will be saved to the error file (after the error message).
By default it is false.
Expand All @@ -202,6 +206,10 @@ By default it is false.
If set to 'true' then skiped events (greater than the BatchSizeLimitBytes) will be stored.
By default it is false.

### DebugStoreFileAction
If set to 'true' then all file actions (move forward, delete, ...) will me stored.
By default it is false.

### DebugStoreAll
If set to 'true' then ALL debug data will be stored. If set to 'false' then each type of debug data will be stored depending on its own switch.
By default it is false.
Expand Down Expand Up @@ -290,6 +298,11 @@ Log.Information("This will be sent to Google PubSub");
```


# Version History

- 2.0.3
Bug fix.
New configuration options: ErrorRollingSpecifier and DebugStoreFileAction.



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ public DurableGoogleCloudPubSubSink(GoogleCloudPubSubSinkOptions options)
/// <param name="bufferRollingSpecifier">Rolling specifier: {Date}, {Hour} or {HalfHour}. The default one is {Hour}.</param>
/// <param name="errorRetainedFileCountLimit">The maximum number of error log files that will be retained, including the current error file. For unlimited retention, pass null. The default is 31.</param>
/// <param name="debugStoreFileAction">If set to 'true' then all file actions(move forward, delete, ...) will me stored.</param>
/// <param name="errorRollingSpecifier">Rolling specifier: {Date}, {Hour} or {HalfHour}. The default one is {Date}.</param>
/// <returns>LoggerConfiguration object</returns>
/// <exception cref="ArgumentNullException"><paramref name="projectId"/> is <see langword="null" />.</exception>
/// <exception cref="ArgumentNullException"><paramref name="topicId"/> is <see langword="null" />.</exception>
Expand Down Expand Up @@ -123,7 +124,8 @@ public DurableGoogleCloudPubSubSink(
bool? debugStoreEventSkip = null,
string bufferRollingSpecifier = null,
int? errorRetainedFileCountLimit = null,
bool? debugStoreFileAction = null)
bool? debugStoreFileAction = null,
string errorRollingSpecifier = null)
{

//--- Creating an options object with the received parameters -------------
Expand Down Expand Up @@ -151,7 +153,8 @@ public DurableGoogleCloudPubSubSink(
debugStoreEventSkip,
bufferRollingSpecifier,
errorRetainedFileCountLimit,
debugStoreFileAction);
debugStoreFileAction,
errorRollingSpecifier);

//-----

Expand All @@ -178,7 +181,7 @@ private void Initialize(GoogleCloudPubSubSinkOptions options)
if (!string.IsNullOrWhiteSpace(options.ErrorBaseFilename))
{
this._errorsRollingFileSink = new RollingFileSink(
options.ErrorBaseFilename + CNST_Specifier_Separator + options.BufferRollingSpecifier + errorsFileExtension,
options.ErrorBaseFilename + CNST_Specifier_Separator + options.ErrorRollingSpecifier + errorsFileExtension,
new GoogleCloudPubSubRawFormatter(), // Formatter for error info (raw).
options.ErrorFileSizeLimitBytes,
options.ErrorRetainedFileCountLimit
Expand Down
Loading

0 comments on commit 6e4bb1b

Please sign in to comment.