Tise.Util.ColoredConsole 1.1.5

dotnet add package Tise.Util.ColoredConsole --version 1.1.5
                    
NuGet\Install-Package Tise.Util.ColoredConsole -Version 1.1.5
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Tise.Util.ColoredConsole" Version="1.1.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Tise.Util.ColoredConsole" Version="1.1.5" />
                    
Directory.Packages.props
<PackageReference Include="Tise.Util.ColoredConsole" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Tise.Util.ColoredConsole --version 1.1.5
                    
#r "nuget: Tise.Util.ColoredConsole, 1.1.5"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Tise.Util.ColoredConsole@1.1.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Tise.Util.ColoredConsole&version=1.1.5
                    
Install as a Cake Addin
#tool nuget:?package=Tise.Util.ColoredConsole&version=1.1.5
                    
Install as a Cake Tool

ColoredConsole

Build Test License Version

Just... Console with colors and animations for 'professional' style.

Preview

Readme-v1 0 6

You can find the source code from the preview here.

Usage

Download

You can download the library as a NuGet package from nuget.org, or download the latest source code and build the package yourself.

Methods


Writer.Log - Output logs to the console.

  • string text (required) - Text to display.
  • LogStatus color (default: LogStatus.Comment) - Text color. See colors in LogStatus.
  • bool newline (default: true) - Is a newline needed?
  • bool timestamp (default: true) - Is a timestamp needed?
  • bool toFile (default: true; recording will not be done without first calling the CreateLogFile method) - Do you need to write to a file?

Examples:

Writer.Log("Message");                            // [15:41:25] Message  | DarkGray
Writer.Log("Message", LogStatus.Warning);         // [15:41:25] Message  | Yellow
Writer.Log("Message", LogStatus.Default, false);  // [15:41:25] Message  | Gray, without newline (\n)
Writer.Log("Message", timestamp: false);          // Message             | DarkGray
Writer.Log("Message", toFile: false);             // [15:41:25] Message  | DarkGray, without logging to file

Writer.CreateLogfile - Required method to start writing logs to a file. Without it, there will be no writing to the file.

  • string directoryName (required) - Log folder name. Final path: .\logs\directoryName\yy.MM.dd-HH.mm.ss.log.

Examples:

Writer.CreateLogFile();               // Logs path: ".\logs\23.03.29-15:41:25.log"
Writer.CreateLogFile(@"");            // Logs path: ".\logs\23.03.29-15:41:25.log"
Writer.CreateLogFile(@"v1.0.6");      // Logs path: ".\logs\v1.0.6\23.03.29-15:41:25.log"
Writer.CreateLogFile(@"v1.0.7\beta"); // Logs path: ".\logs\v1.0.7\beta\23.03.29-15:41:25.log"
Writer.CreateLogFile(@"..\");         // Logs path: ".\23.03.29-15:41:25.log"

Repository

Issues

To report issues or suggest a new feature, please head over to the Issues page.

Contributions

For contributions, please open a Pull request.

License

ColoredConsole's code package is licensed under the MIT licence. Please see the licence file for more information. tl;dr you can do whatever you want as long as you include the original copyright and license notice in any copy of the software/source.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.5 360 4/8/2023
1.1.2 310 4/5/2023
1.1.1 489 4/5/2023 1.1.1 is deprecated because it has critical bugs.

Update CreateLogFile method and readme https://github.com/tisepw/ColoredConsole