Documentation ¶
Index ¶
Constants ¶
View Source
const ( CONSOLE TYPE = 1 << iota // Log to console. FILE // Log to file. AWS // Log to AWS (placeholder, not implemented). SUCCESS = true // Indicates success log. FAILURE = false // Indicates failure or error log. DEFAULT = CONSOLE | FILE // Default log destinations. )
Constants representing different logging destinations and log types.
Variables ¶
View Source
var ( FILE_STDERR = path.Join(config.PATH_LOGS, config.BUILD_APP_NAME+".err") // File path for standard error logs. FILE_STDOUT = path.Join(config.PATH_LOGS, config.BUILD_APP_NAME+".out") // File path for standard output logs. CONSOLE_STDERR = os.Stderr // Standard error console output. CONSOLE_STDOUT = os.Stdout // Standard output console output. )
File paths for standard error and standard output logs.
Functions ¶
func Make ¶
Make creates an io.Writer based on the specified TYPE and SOF. It can create a multi-writer that writes to console and/or file based on the provided flags.
Parameters: - t: TYPE The type of writer(s) to create. - sof: SOF Indicates whether the writer is for success (true) or failure (false) logs.
Returns: - io.Writer: A writer that logs to the specified destinations.
Types ¶
Click to show internal directories.
Click to hide internal directories.