All Projects → dixonwille → wlog

dixonwille / wlog

Licence: MIT license
A simple logging interface that supports cross-platform color and concurrency.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to wlog

QuickTraceiOSLogger
A real time iOS log trace tool, view iOS log with pc web browser under local area network, which will automatically scroll like xcode. 一个实时的iOS日志跟踪工具,在局域网中使用 PC Web 浏览器查看 iOS 日志,它将像xcode一样自动滚动。
Stars: ✭ 16 (-72.88%)
Mutual labels:  logger
loggers
Abstract logging for Golang projects. A kind of log4go in the spirit of log4j
Stars: ✭ 17 (-71.19%)
Mutual labels:  logger
lines-logger
Browser logger that rests lines in peace
Stars: ✭ 26 (-55.93%)
Mutual labels:  logger
DustViewerSharp
UART-USB based dust sensor viewer(and also logging) program by C#
Stars: ✭ 38 (-35.59%)
Mutual labels:  logger
WormholyForObjectiveC
Network debugging made easy,This network debugging tool is developed based on the swift version of Wormholy.
Stars: ✭ 21 (-64.41%)
Mutual labels:  logger
Web-Tracker
Stand alone program that Tracks/Logs all the opened websites in the Chrome Browser. Even incognito! *No need to install anything in browser*
Stars: ✭ 34 (-42.37%)
Mutual labels:  logger
mini-async-log-c
Mini async log C port. Now with C++ wrappers.
Stars: ✭ 69 (+16.95%)
Mutual labels:  logger
gtree
Output tree🌳 or Make directories📁 from #Markdown or Programmatically. Provide CLI, Golang library and Web (using #Wasm ).
Stars: ✭ 88 (+49.15%)
Mutual labels:  awesome-go
l
Golang Pretty Logger
Stars: ✭ 51 (-13.56%)
Mutual labels:  logger
logback-access-spring-boot-starter
Spring Boot Starter for Logback-access.
Stars: ✭ 153 (+159.32%)
Mutual labels:  logger
ng-logger
Angular logger service
Stars: ✭ 65 (+10.17%)
Mutual labels:  logger
Torch-Scope
A Toolkit for Training, Tracking, Saving Models and Syncing Results
Stars: ✭ 62 (+5.08%)
Mutual labels:  logger
LogDNA-Android-Client
Android client for LogDNA
Stars: ✭ 22 (-62.71%)
Mutual labels:  logger
log
Aplus Framework Log Library
Stars: ✭ 14 (-76.27%)
Mutual labels:  logger
JJSwiftLog
Swift log library for all platform
Stars: ✭ 51 (-13.56%)
Mutual labels:  logger
datalogger
DataLogger foi projetado para ser uma biblioteca simples de log com suporte a vários providers.
Stars: ✭ 46 (-22.03%)
Mutual labels:  logger
ets2-job-logger
ETS2 Job Logger
Stars: ✭ 15 (-74.58%)
Mutual labels:  logger
logops
Really simple and performant logger for node projects compatible with any kind of deployments as your server operations/environment defined
Stars: ✭ 20 (-66.1%)
Mutual labels:  logger
DRF-API-Logger
An API Logger for your Django Rest Framework project.
Stars: ✭ 184 (+211.86%)
Mutual labels:  logger
perforce-commit-discord-bot
🗒️ ✏️Posts the most recent commit messages from a Perforce version control server to a Discord channel.
Stars: ✭ 22 (-62.71%)
Mutual labels:  logger

WLog Build Status Go Report Card codecov

Package wlog creates simple to use UI structure. The UI is used to simply print to the screen. There a wrappers that will wrap each other to create a good looking UI. You can add color and prefixes as well as make it thread safe.

Documentation

https://pkg.go.dev/github.com/dixonwille/wlog/v3

import "github.com/dixonwille/wlog/v3"

Idea Behind WLog

I used Mitchellh's CLI structure and wrapping for the different structures. It was a clean look and feel. Plus it was pretty simple to use. But I didn't want all the other cli stuff that came with the package so I created this.

For color I use DavidDenGCN's Go-ColorText. His color package allows for color that is available cross-platforms. I made a wrapper with all possible color combinations with his package. So you only have to import this package (one less line).

Example

var ui UI
reader := strings.NewReader("User Input\r\n") //Simulate user typing "User Input" then pressing [enter] when reading from os.Stdin
ui = New(reader, os.Stdout, os.Stdout)
ui = AddPrefix("?", Cross, " ", "", "", "~", Check, "!", ui)
ui = AddConcurrent(ui)

ui.Ask("Ask question", "")
ui.Error("Error message")
ui.Info("Info message")
ui.Output("Output message")
ui.Running("Running message")
ui.Success("Success message")
ui.Warn("Warning message")

Output:

? Ask question
✗ Error message
 Info message
Output message
~ Running message
✓ Success message
! Warning message

On Windows it outputs to this (this includes color):

winss

On Mac it outputs to this (this includes color):

macss

Usage

Please use the Documentaion to read more into how to use this package.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].