logging

package
v0.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2024 License: MIT Imports: 5 Imported by: 0

README

Logging Examples

Status logging functions

package main

import (
  "fmt"

  "github.com/D3Ext/maldev/src/logging"
)

func main(){
  test = "Example text!"

  logging.Success(test)
  logging.Error(test)
  logging.Info(test)
  logging.Warning(test)
  logging.Debug(test)
}

Use colors

package main

import (
  "fmt"

  "github.com/D3Ext/maldev/src/logging"
)

func main(){
  test = "Example text!"

  logging.Green(test)
  logging.Red(test)
  logging.Purple(test)
  logging.Blue(test)
  logging.Cyan(test)

  green_text := logging.SGreen(test)
  red_text := logging.SRed(test)
  purple_text := logging.SPurple(test)
  blue_text := logging.SBlue(test)
  cyan_text := logging.SCyan(test)

  fmt.Println(green_text)
  fmt.Println(red_text)
  fmt.Println(purple_text)
  fmt.Println(blue_text)
  fmt.Println(cyan_text)
}

Create banners

package main

import (
  "fmt"

  "github.com/D3Ext/maldev/src/logging"
)

func main(){
  logging.PrintBanner("Maldev")

  fmt.Println("==================")

  ascii := logging.GetBanner("Maldev")
  fmt.Println(ascii)
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Blue

func Blue(v ...interface{})

func Cyan

func Cyan(v ...interface{})

func Debug

func Debug(v ...interface{})

func Error

func Error(v ...interface{})

func GetBanner

func GetBanner(str_to_convert string) string

func GetTime

func GetTime() string

Function to get current time

func Green

func Green(v ...interface{})

func Info

func Info(v ...interface{})

func PrintBanner

func PrintBanner(str_to_convert string)

func ProgressBar

func ProgressBar(spinner_text string, spinner_duration int, spinner_delay int)

func Purple

func Purple(v ...interface{})

func Red

func Red(v ...interface{})

func SBlue

func SBlue(v ...interface{}) string

func SCyan

func SCyan(v ...interface{}) string

func SGreen

func SGreen(v ...interface{}) string

func SPurple

func SPurple(v ...interface{}) string

func SRed

func SRed(v ...interface{}) string

func Success

func Success(v ...interface{})

Simple logging functinos with current time and status

func Warning

func Warning(v ...interface{})

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳