https://github.com/grimdork/loglines
Basic timestamped console printing.
https://github.com/grimdork/loglines
go logging package
Last synced: 10 months ago
JSON representation
Basic timestamped console printing.
- Host: GitHub
- URL: https://github.com/grimdork/loglines
- Owner: grimdork
- License: mit
- Created: 2021-11-20T06:50:28.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-18T04:26:37.000Z (about 2 years ago)
- Last Synced: 2025-01-30T05:43:38.101Z (over 1 year ago)
- Topics: go, logging, package
- Language: Go
- Homepage:
- Size: 2.93 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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:
```go
import (
"fmt"
ll "github.com/grimdork/loglines"
)
func main() {
ll.Msg("Hello, console!")
ll.Err("This is an error message.")
}
```