logger

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2023 License: MIT Imports: 4 Imported by: 0

README

Logger

The logger package provides a simple and colorful solution for logging in Go applications. It is designed to be easy to use and offers formatted messages for different log levels.

Installation

Use the following command to install the logger package:

go get -u github.com/rafaelb13/logger

Usage

package main

import (
	"github.com/rafaelb13/logger"
)

func main() {
	// Example of how to use the logger
	log := logger.NewLogger("parameter")
	log.Debug("Debug message")
	log.Info("Information message")
	log.Warn("Warning message")
	log.Error("Error message")
}

Contribution

If you want to contribute, please follow these steps:

  1. Fork the repository
  2. Create a branch for your feature (git checkout -b feature/YourFeature)
  3. Commit your changes (git commit -m 'Adding awesome feature')
  4. Push to the branch (git push origin feature/YourFeature)
  5. Open a pull request

Contribution

If you want to contribute, please follow these steps:

  1. Fork the repository
  2. Create a branch for your feature (git checkout -b feature/YourFeature)
  3. Commit your changes (git commit -m 'Adding awesome feature')
  4. Push to the branch (git push origin feature/YourFeature)
  5. Open a pull request

Version

1.21.3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger() *Logger

func (*Logger) Debug

func (l *Logger) Debug(v ...interface{})

Create Non-Formatted Logs

func (*Logger) Debugf

func (l *Logger) Debugf(format string, v ...interface{})

Create Format Enabled Logs

func (*Logger) Error

func (l *Logger) Error(v ...interface{})

func (*Logger) Errorf

func (l *Logger) Errorf(format string, v ...interface{})

func (*Logger) Info

func (l *Logger) Info(v ...interface{})

func (*Logger) Infof

func (l *Logger) Infof(format string, v ...interface{})

func (*Logger) Warn

func (l *Logger) Warn(v ...interface{})

func (*Logger) Warnf

func (l *Logger) Warnf(format string, v ...interface{})

Jump to

Keyboard shortcuts

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