logging

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error_Log added in v0.1.3

func Error_Log(messageInput string, a ...interface{})

func Event_Log added in v0.1.3

func Event_Log(messageInput string, a ...interface{})

func Info_Log added in v0.1.3

func Info_Log(messageInput string, a ...interface{})

func Warning_Log added in v0.1.3

func Warning_Log(messageInput string, a ...interface{})

Types

type Log

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

***************************************************************************************

  • Struct : Log *
  • Purpose : Object handles the Log methods to create log file with rotation feature *

****************************************************************************************

func LogConstructor

func LogConstructor(fileName string, outputDuplicateFlag bool, fileSize ...int64) Log

***************************************************************************************

*
* Function : LogConstructor (Constructor)
*
*  Purpose : Creates a new instance of the Log object
*
*	Return : Log object

func (*Log) Error_Log

func (log *Log) Error_Log(messageInput string, a ...interface{})

***************************************************************************************

*
* Function : Log::Error_Log
*
* Purpose : Logging ERROR type message
*
*   Input : messageInput string - text of the message
*           a ...interface{} - data for the message
*
*  Return : Nothing

func (*Log) Event_Log

func (log *Log) Event_Log(messageInput string, a ...interface{})

***************************************************************************************

*
* Function : Log::Event_Log
*
* Purpose : Logging EVENT type message
*
*   Input : messageInput string - text of the message
*           a ...interface{} - data for the message
*
*  Return : Nothing

func (*Log) Info_Log

func (log *Log) Info_Log(messageInput string, a ...interface{})

***************************************************************************************

*
* Function : Log::Info_Log
*
* Purpose : Logging INFO type message
*
*   Input : messageInput string - text of the message
*           a ...interface{} - data for the message
*
*  Return : Nothing

func (*Log) OpenCreateFile

func (log *Log) OpenCreateFile(filename string) *os.File

***************************************************************************************

*
* Function : Log::OpenCreateFile
*
*  Purpose : Open file and return file pointer to the log file to add message
*
*   Input : filename string - name of the current log file
*
*  Return : Return file pointer

func (*Log) Warning_Log

func (log *Log) Warning_Log(messageInput string, a ...interface{})

***************************************************************************************

*
* Function : Log::Warning_Log
*
* Purpose : Logging WARNING type message
*
*   Input : messageInput string - text of the message
*           a ...interface{} - data for the message
*
*  Return : Nothing

type LogInitInterface added in v0.1.3

type LogInitInterface interface {
	LogInit(filename string)

	Info_Log(messageInput string)
	Warning_Log(messageInput string)
	Error_Log(messageInput string)
}

type Message_Type

type Message_Type string
const (
	Message_Error   Message_Type = "ERROR"
	Message_Info    Message_Type = "INFO"
	Message_Warning Message_Type = "WARNING"
	Message_Event   Message_Type = "EVENT"

	LOG_FILE_SIZE = 5000000
)

Jump to

Keyboard shortcuts

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