Pārlūkot izejas kodu

add a logline and a help description for CRASHSERVER

tags/v2.0.0-rc1
Shivaram Lingamneni 4 gadus atpakaļ
vecāks
revīzija
490b3722bd
2 mainītis faili ar 4 papildinājumiem un 2 dzēšanām
  1. 1
    0
      irc/handlers.go
  2. 3
    2
      irc/help.go

+ 1
- 0
irc/handlers.go Parādīt failu

@@ -815,6 +815,7 @@ func debugHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *Res
815 815
 			rb.Notice(fmt.Sprintf(client.t("To crash the server, issue the following command: /DEBUG CRASHSERVER %s"), code))
816 816
 			return false
817 817
 		}
818
+		server.logger.Error("server", fmt.Sprintf("DEBUG CRASHSERVER executed by operator %s", client.Oper().Name))
818 819
 		go func() {
819 820
 			// intentional nil dereference on a new goroutine, bypassing recover-from-errors
820 821
 			var i, j *int

+ 3
- 2
irc/help.go Parādīt failu

@@ -153,13 +153,14 @@ https://gist.github.com/DanielOaks/c104ad6e8759c01eb5c826d627caf80d`,
153 153
 		oper: true,
154 154
 		text: `DEBUG <option>
155 155
 
156
-Prints debug information about the IRCd. <option> can be one of:
156
+Provides various debugging commands for the IRCd. <option> can be one of:
157 157
 
158 158
 * GCSTATS: Garbage control statistics.
159 159
 * NUMGOROUTINE: Number of goroutines in use.
160 160
 * STARTCPUPROFILE: Starts the CPU profiler.
161 161
 * STOPCPUPROFILE: Stops the CPU profiler.
162
-* PROFILEHEAP: Writes out the CPU profiler info.`,
162
+* PROFILEHEAP: Writes a memory profile.
163
+* CRASHSERVER: Crashes the server (for use in failover testing)`,
163 164
 	},
164 165
 	"dline": {
165 166
 		oper: true,

Notiek ielāde…
Atcelt
Saglabāt