Categorygithub.com/grestful/logs
modulepackage
1.0.7
Repository: https://github.com/grestful/logs.git
Documentation: pkg.go.dev

# README

logs

# Functions

BytesToString converts byte slice to string.
Wrapper for (*Logger).Close (closes and removes all logwriters).
Utility for debug log messages When given a string as the first argument, this behaves like Logf but with the DEBUG log level (e.g.
Utility for error log messages (returns an error for easy function returns) (see Debug() for parameter explanation) These functions will execute a closure exactly once, to build the error message for the return Wrapper for (*Logger).Error.
no err return Error.
Compatibility with `log`.
Compatibility with `log`.
Utility for critical log messages (returns an error for easy function returns) (see Debug() for parameter explanation) These functions will execute a closure exactly once, to build the error message for the return Wrapper for (*Logger).Critical.
no err return Fatal.
Known format codes: %A - Time (2006-01-02T15:04:05.000Z) means all %T - Time (15:04:05 MST) %t - Time (15:04) %D - Date (2006/01/02) %d - Date (01/02/06) %L - Level (FNST, FINE, DEBG, TRAC, WARN, EROR, CRIT) %S - Source %M - Message Ignores unknown formats Recommended: "[%D %T] [%L] (%S) %M".
LOGGER get the log Filter by category.
Utility for info log messages (see Debug() for parameter explanation) Wrapper for (*Logger).Info.
Send a log message manually Wrapper for (*Logger).Log.
Send a closure log message Wrapper for (*Logger).Logc.
Send a formatted log message easily Wrapper for (*Logger).Logf.
NewConn create new ConnWrite returning as LoggerInterface.
Create a new logger with a "stdout" filter configured to send log messages at or above lvl to standard output.
This creates a new ConsoleLogWriter.
Create a new logger with a "stdout" filter configured to send log messages at or above lvl to standard output.
NewFileLogWriter creates a new LogWriter which writes to the given file and has rotation enabled if rotate is true.
This creates a new FormatLogWriter.
Create a new logger.
No description provided by the author
No description provided by the author
Formats: map[string]string{ TODO(kevlar): How can I do this so it'll work outside of PST?FORMAT_DEFAULT: "[2009/02/13 23:31:30 UTC] [EROR] (source) message\n",FORMAT_SHORT: "[23:31 13/02/09] [EROR] message\n",FORMAT_ABBREV: "[EROR] message\n",},.
No description provided by the author
No description provided by the author
Compatibility with `log`.
Compatibility with `log`.
Compatibility with `log`.
Compatibility with `log`.
StringToBytes converts string to byte slice.
Utility for trace log messages (see Debug() for parameter explanation) Wrapper for (*Logger).Trace.
Utility for warn log messages (returns an error for easy function returns) (see Debug() for parameter explanation) These functions will execute a closure exactly once, to build the error message for the return Wrapper for (*Logger).Warn.
no err return Warn.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
LogBufferLength specifies how many log messages a particular log4go logger can buffer at a time before writing them.
No description provided by the author

# Structs

ConnWriter implements LoggerInterface.
No description provided by the author
This is the standard writer that prints to standard output.
No description provided by the author
This log writer sends output to a file.
A Filter represents the log level below which no log records are written to the associated LogWriter.
LogConfig presents json log config struct.
A LogRecord contains all of the pertinent information for each message.
No description provided by the author

# Interfaces

This is an interface for anything that should be able to write logs.

# Type aliases

These are the integer logging levels used by the logger.
A Logger represents a collection of Filters through which log messages are written.