Browse Source

Update README.md

Volodymyr Tkach 2 years ago
parent
commit
2f222392dd
1 changed files with 27 additions and 0 deletions
  1. 27 0
      README.md

+ 27 - 0
README.md

@@ -165,4 +165,31 @@ func LogError(format string, a ...any)
 func LogInfo(format string, a ...any)
 func LogInfo(format string, a ...any)
 func LogInternalError(err error)
 func LogInternalError(err error)
 func LogRequests(handler http.Handler) http.Handler
 func LogRequests(handler http.Handler) http.Handler
+
+// Write logs to file:
+func main() {
+    logger.AccessLogFile = consts.Config.AccessLogFile
+    logger.ErrorLogFile = consts.Config.ErrorLogFile
+    ...
+}
+```
+
+RollBar supports from box:
+
+```go
+func main() {
+    logger.RollBarEnabled = (consts.Config.Deployment == "production")
+
+    logger.RollBarSkipErrors = []string{
+        "context canceled",
+    }
+
+    rollbar.SetToken("token")
+    rollbar.SetEnvironment(consts.Config.Deployment)
+    rollbar.SetCodeVersion(consts.AppVersion)
+
+    ...
+
+    rollbar.Wait()
+}
 ```
 ```