Standard library / log
log.Logger.Println()
Write a line using space-separated operands. Expected stdout: 'a b\n'.
Formal Syntax & Structure
go syntaxgo
func (l *Logger) Println(v ...any)Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| v | ...any | Values to log or convert. |
Working Example
Example Snippetgo
package main
import ( "bytes" "fmt" "log")
func main() { var b bytes.Buffer; l := log.New(&b, "", 0); l.Println("a", "b"); fmt.Print(b.String()) }