https://github.com/manzoor77/go-logfile
create logfile in go
https://github.com/manzoor77/go-logfile
go-log go-logger logfile
Last synced: about 1 month ago
JSON representation
create logfile in go
- Host: GitHub
- URL: https://github.com/manzoor77/go-logfile
- Owner: manzoor77
- Created: 2023-04-10T10:06:17.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-10T10:16:51.000Z (about 3 years ago)
- Last Synced: 2024-06-21T00:07:10.759Z (about 2 years ago)
- Topics: go-log, go-logger, logfile
- Language: Go
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# go-logfile
### create logfile in go
1. Run the command **go run main.go** to compile and execute the program.
2. Open a web browser and navigate to **http://localhost:8080**
3. You should see the message **"Hello, World!"** in the browser, and a log file called **"api.log"** should be created in the same directory as **main.go**.
Here's an **example** of what the console output should look like:
> 2023/04/10 15:42:17 Starting server on port 8080
> 2023/04/10 15:42:24 Request from 127.0.0.1:50586 for /
> 2023/04/10 15:42:27 Request from 127.0.0.1:50586 for /favicon.ico