| 117 | } |
| 118 | |
| 119 | func (s *DispatchServerV2) stdlogHandler(logfrom int) func(w http.ResponseWriter, r *http.Request) { |
| 120 | return func(w http.ResponseWriter, r *http.Request) { |
| 121 | conn, buf, ok := setupHijackConn(w, r) |
| 122 | if !ok { |
| 123 | return |
| 124 | } |
| 125 | defer conn.Close() |
| 126 | |
| 127 | runtimeid := r.Header.Get("x-cfc-runtimeid") |
| 128 | logs.Infof("stdlogHandler runtimeid %s logfrom %d connect", runtimeid, logfrom) |
| 129 | defer logs.Infof("stdlogHandler runtimeid %s logfrom %d disconnect", runtimeid, logfrom) |
| 130 | m, ok := s.storeMap.getMap(runtimeid) |
| 131 | if !ok { |
| 132 | logs.Errorf("stdlogHandler can't get map runtimeid %s", runtimeid) |
| 133 | return |
| 134 | } |
| 135 | logDispatcher := m.NewStdLogDispatcher(runtimeid, logfrom, buf, 0) |
| 136 | logDispatcher.Read() |
| 137 | } |
| 138 | } |
| 139 | |
| 140 | func (s *DispatchServerV2) statisticHandler(w http.ResponseWriter, r *http.Request) { |
| 141 | conn, _, ok := setupHijackConn(w, r) |