Discover Packages
github.com/grimdork/loglines
package
module
Version:
v1.0.2
Opens a new window with list of versions in this module.
Published: Apr 18, 2024
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 6 modules, 6 packages
The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
Opens a new window with list of known importers.
README
README
¶
loglines
Basic timestamped console printing.
What
This is a very simple package with three functions:
NowString() returns a string with the current time in a format similar to Apache's common log format. Used by the other two functions.
Msg() prints a message to stdout.
Err() prints an error message to stderr.
That's it. It just prints stuff neatly.
How
Example usage:
import (
"fmt"
ll "github.com/grimdork/loglines"
)
func main() {
ll.Msg("Hello, console!")
ll.Err("This is an error message.")
}
Expand ▾
Collapse ▴
Documentation
¶
func Err(f string , v ...interface{})
Err prints formatted messages to stderr, starting with a nicely formatted timestamp.
func Msg(f string , v ...interface{})
Msg prints formatted messages to stdout, starting with a nicely formatted timestamp.
NowString returns a very detailed time string.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.