-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Lunet.Extensions.Logging.SpectreConsole for logging
- Loading branch information
Showing
10 changed files
with
39 additions
and
1,016 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System.IO; | ||
using System.Text; | ||
using Spectre.Console; | ||
|
||
namespace DotNetReleaser.Logging; | ||
|
||
/// <summary> | ||
/// Allows to override the output to set the width/heigth (e.g for console out in GitHub Action) | ||
/// </summary> | ||
public class AnsiConsoleOutputOverride : IAnsiConsoleOutput | ||
{ | ||
private readonly IAnsiConsoleOutput _delegate; | ||
|
||
public AnsiConsoleOutputOverride(IAnsiConsoleOutput @delegate) | ||
{ | ||
_delegate = @delegate; | ||
Width = 80; | ||
Height = 80; | ||
} | ||
|
||
public void SetEncoding(Encoding encoding) | ||
{ | ||
_delegate.SetEncoding(encoding); | ||
} | ||
|
||
public TextWriter Writer => _delegate.Writer; | ||
|
||
public bool IsTerminal => _delegate.IsTerminal; | ||
|
||
public int Width { get; set; } | ||
|
||
public int Height { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.