logging

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2023 License: MIT Imports: 5 Imported by: 1

README

Logging Examples

Status logs

package main

import (
  "fmt"

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

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

  logging.Goodln(test)
  logging.Badln(test) // Note the "ln" on the function as fmt functions
  logging.Infoln(test)

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

  logging.Good(test)
  logging.Bad(test)
  logging.Info(test)
}

Use colors

package main

import (
  "fmt"

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

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

  logging.Greenln(test)
  logging.Redln(test)
  logging.Purpleln(test)
  logging.Blueln(test)
  logging.Cyanln(test)

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

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

  fmt.Println("\n============")

  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/logging"
)

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

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

Print text with time

package main

import (
  "github.com/D3Ext/maldev/logging"
)

func main(){
  logging.TimePrintln("This is an example!")
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bad

func Bad(str_to_print string)

func Badln

func Badln(str_to_print string)

func Blue

func Blue(str_to_print string)

func Blueln

func Blueln(str_to_print string)

func Cyan

func Cyan(str_to_print string)

func Cyanln

func Cyanln(str_to_print string)

func GetBanner

func GetBanner(str_to_convert string) string

func GetTime

func GetTime() string

func Good

func Good(str_to_print string)

func Goodln

func Goodln(str_to_print string)

Println functions

func Green

func Green(str_to_print string)

func Greenln

func Greenln(str_to_print string)

func Info

func Info(str_to_print string)

func Infoln

func Infoln(str_to_print string)

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(str_to_print string)

func Purpleln

func Purpleln(str_to_print string)

func Red

func Red(str_to_print string)

func Redln

func Redln(str_to_print string)

func SBlue

func SBlue(str_to_print string) string

func SCyan

func SCyan(str_to_print string) string

func SGreen

func SGreen(str_to_print string) string

func SPurple

func SPurple(str_to_print string) string

func SRed

func SRed(str_to_print string) string

func TimePrint

func TimePrint(input string)

func TimePrintln

func TimePrintln(input string)

func TimeSprint

func TimeSprint(input string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL