Skip to content

Commit

Permalink
Merge pull request #84 from webability-go/late-night
Browse files Browse the repository at this point in the history
patch v1.7.2
  • Loading branch information
metalwolf authored Aug 2, 2022
2 parents 9fa6797 + 85d1b95 commit fe43125
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1496,13 +1496,17 @@ Extras:

# Version Changes Control

v1.7.2 - 2022-08-01
-----------------------
- parameter %referer% added into pages logs for hosts

v1.7.1 - 2022-07-03
-----------------------
- Separation of librarypath and library for all plugins (components, engines and plugins), to have a better control of plugin prexif and version

v1.7.0 - 2022-06-29
-----------------------
- global pluginprefix and hostname parameters added to the configuration .json files. Those parameters are needed when you run multiple instances of the xamboo based on the same directory/code, to compile and load all the .so plugins to avoid conflicts ( name as pluginprefix + "-" + hostame + "library.so." + serial )
- global pluginprefix parameter added to the configuration .json files. This parameter is needed when you run multiple instances of the xamboo based on the same directory/code, to compile and load all the .so plugins to avoid conflicts ( name as pluginpath + pluginprefix + "-" + hostame + "library.so." + serial )
- Compiler enhanced to better log compiled code with elapsed time, library, output errors.

v1.6.6 - 2021-12-02
Expand Down
1 change: 1 addition & 0 deletions components/log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ func buildLogParams(hw host.HostWriter) map[string]string {
data["starttime"] = fmt.Sprint(req.StartTime)
data["endtime"] = fmt.Sprint(req.Time)
data["request"] = fmt.Sprint(req.Request)
data["referer"] = fmt.Sprint(req.Referer)
data["method"] = fmt.Sprint(req.Method)
data["code"] = fmt.Sprint(req.Code)
data["bytesout"] = fmt.Sprint(req.Length)
Expand Down
4 changes: 3 additions & 1 deletion components/stat/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ type RequestStat struct {
Time time.Time
Hostname string
Request string
Referer string
Protocol string
Method string
Code int
Expand Down Expand Up @@ -102,7 +103,7 @@ func (s *MainStat) Clean() {
}
}

func CreateRequestStat(request string, method string, protocol string, code int, length int, duration time.Duration, remoteaddr string) *RequestStat {
func CreateRequestStat(request string, method string, protocol string, code int, length int, duration time.Duration, remoteaddr string, referer string) *RequestStat {

ip, port, _ := net.SplitHostPort(remoteaddr)

Expand All @@ -111,6 +112,7 @@ func CreateRequestStat(request string, method string, protocol string, code int,
StartTime: time.Now(),
Time: time.Now(),
Request: request,
Referer: referer,
Method: method,
Protocol: protocol,
Code: code,
Expand Down
2 changes: 1 addition & 1 deletion components/stat/stat.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (st *Stat) Handler(handler http.HandlerFunc) http.HandlerFunc {
lg.Println("C[stat]: We are going to create the statwriter.")
}

req := CreateRequestStat(r.Host+r.URL.Path, r.Method, r.Proto, 0, 0, 0, r.RemoteAddr)
req := CreateRequestStat(r.Host+r.URL.Path, r.Method, r.Proto, 0, 0, 0, r.RemoteAddr, r.Referer())
req.Hostname = host.Name
sw := writer{writer: hw, RequestStat: req}
hw.SetParam("requeststat", req)
Expand Down
2 changes: 1 addition & 1 deletion xamboo.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
package xamboo

// VERSION last oficial published version of the xamboo on github.com
const VERSION = "1.7.1"
const VERSION = "1.7.2"

0 comments on commit fe43125

Please sign in to comment.