|
1 | 1 | # gocolorlog |
2 | 2 |
|
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
3 | 8 | **gocolorlog** is a simple, extensible, and colored logging package for Go. |
4 | 9 | It maps HTTP status codes to colored log levels, making your terminal output clear and easy to read. |
5 | 10 |
|
@@ -50,9 +55,9 @@ func main() { |
50 | 55 | gocolorlog.Error("Failed to connect to DB") |
51 | 56 | gocolorlog.Errorf("Failed to open file: %s", "config.yaml") |
52 | 57 |
|
53 | | - gocolorlog.HTTP(200, "GET", "/api/test", 120*time.Millisecond,"ip-adress", "",nil) |
54 | | - gocolorlog.HTTP(404, "POST", "/api/notfound", 80*time.Millisecond,"ip-adress","Requsetid", nil) |
55 | | - gocolorlog.HTTP(500, "DELETE", "/api/error", 200*time.Millisecond,"ip-adress", "Requsetid",fmt.Errorf("internal server error")) |
| 58 | + gocolorlog.HTTP(200, "GET", "/api/test", 120*time.Millisecond, "ip-adress", "", nil) |
| 59 | + gocolorlog.HTTP(404, "POST", "/api/notfound", 80*time.Millisecond, "ip-adress", "Requsetid", nil) |
| 60 | + gocolorlog.HTTP(500, "DELETE", "/api/error", 200*time.Millisecond, "ip-adress", "Requsetid", fmt.Errorf("internal server error")) |
56 | 61 |
|
57 | 62 | gocolorlog.ContextLevel("INFO", "Bootstrap", "Application is running on: %s", "http://localhost:3000") |
58 | 63 |
|
|
0 commit comments