Skip to content

Commit 704da08

Browse files
authored
Better logging (#6038) (#6095)
* Panic don't fatal on create new logger Fixes #5854 Signed-off-by: Andrew Thornton <[email protected]> * partial broken * Update the logging infrastrcture Signed-off-by: Andrew Thornton <[email protected]> * Reset the skip levels for Fatal and Error Signed-off-by: Andrew Thornton <[email protected]> * broken ncsa * More log.Error fixes Signed-off-by: Andrew Thornton <[email protected]> * Remove nal * set log-levels to lowercase * Make console_test test all levels * switch to lowercased levels * OK now working * Fix vetting issues * Fix lint * Fix tests * change default logging to match current gitea * Improve log testing Signed-off-by: Andrew Thornton <[email protected]> * reset error skip levels to 0 * Update documentation and access logger configuration * Redirect the router log back to gitea if redirect macaron log but also allow setting the log level - i.e. TRACE * Fix broken level caching * Refactor the router log * Add Router logger * Add colorizing options * Adjust router colors * Only create logger if they will be used * update app.ini.sample * rename Attribute ColorAttribute * Change from white to green for function * Set fatal/error levels * Restore initial trace logger * Fix Trace arguments in modules/auth/auth.go * Properly handle XORMLogger * Improve admin/config page * fix fmt * Add auto-compression of old logs * Update error log levels * Remove the unnecessary skip argument from Error, Fatal and Critical * Add stacktrace support * Fix tests * Remove x/sync from vendors? * Add stderr option to console logger * Use filepath.ToSlash to protect against Windows in tests * Remove prefixed underscores from names in colors.go * Remove not implemented database logger This was removed from Gogs on 4 Mar 2016 but left in the configuration since then. * Ensure that log paths are relative to ROOT_PATH * use path.Join * rename jsonConfig to logConfig * Rename "config" to "jsonConfig" to make it clearer * Requested changes * Requested changes: XormLogger * Try to color the windows terminal If successful default to colorizing the console logs * fixup * Colorize initially too * update vendor * Colorize logs on default and remove if this is not a colorizing logger * Fix documentation * fix test * Use go-isatty to detect if on windows we are on msys or cygwin * Fix spelling mistake * Add missing vendors * More changes * Rationalise the ANSI writer protection * Adjust colors on advice from @0x5c * Make Flags a comma separated list * Move to use the windows constant for ENABLE_VIRTUAL_TERMINAL_PROCESSING * Ensure matching is done on the non-colored message - to simpify EXPRESSION
1 parent ef2a343 commit 704da08

File tree

301 files changed

+36958
-8209
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

301 files changed

+36958
-8209
lines changed

cmd/hook.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -204,14 +204,14 @@ func runHookPostReceive(c *cli.Context) error {
204204
RepoUserName: repoUser,
205205
RepoName: repoName,
206206
}); err != nil {
207-
log.GitLogger.Error(2, "Update: %v", err)
207+
log.GitLogger.Error("Update: %v", err)
208208
}
209209

210210
if newCommitID != git.EmptySHA && strings.HasPrefix(refFullName, git.BranchPrefix) {
211211
branch := strings.TrimPrefix(refFullName, git.BranchPrefix)
212212
repo, pullRequestAllowed, err := private.GetRepository(repoID)
213213
if err != nil {
214-
log.GitLogger.Error(2, "get repo: %v", err)
214+
log.GitLogger.Error("get repo: %v", err)
215215
break
216216
}
217217
if !pullRequestAllowed {
@@ -229,7 +229,7 @@ func runHookPostReceive(c *cli.Context) error {
229229

230230
pr, err := private.ActivePullRequest(baseRepo.ID, repo.ID, baseRepo.DefaultBranch, branch)
231231
if err != nil {
232-
log.GitLogger.Error(2, "get active pr: %v", err)
232+
log.GitLogger.Error("get active pr: %v", err)
233233
break
234234
}
235235

cmd/migrate.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func runMigrate(ctx *cli.Context) error {
4444
models.LoadConfigs()
4545

4646
if err := models.NewEngine(migrations.Migrate); err != nil {
47-
log.Fatal(4, "Failed to initialize ORM engine: %v", err)
47+
log.Fatal("Failed to initialize ORM engine: %v", err)
4848
return err
4949
}
5050

cmd/serv.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ func fail(userMessage, logMessage string, args ...interface{}) {
100100
if !setting.ProdMode {
101101
fmt.Fprintf(os.Stderr, logMessage+"\n", args...)
102102
}
103-
log.GitLogger.Fatal(3, logMessage, args...)
103+
log.GitLogger.Fatal(logMessage, args...)
104104
return
105105
}
106106

cmd/web.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func runHTTPRedirector() {
6969
var err = runHTTP(source, context2.ClearHandler(handler))
7070

7171
if err != nil {
72-
log.Fatal(4, "Failed to start port redirection: %v", err)
72+
log.Fatal("Failed to start port redirection: %v", err)
7373
}
7474
}
7575

@@ -84,7 +84,7 @@ func runLetsEncrypt(listenAddr, domain, directory, email string, m http.Handler)
8484
log.Info("Running Let's Encrypt handler on %s", setting.HTTPAddr+":"+setting.PortToRedirect)
8585
var err = http.ListenAndServe(setting.HTTPAddr+":"+setting.PortToRedirect, certManager.HTTPHandler(http.HandlerFunc(runLetsEncryptFallbackHandler))) // all traffic coming into HTTP will be redirect to HTTPS automatically (LE HTTP-01 validation happens here)
8686
if err != nil {
87-
log.Fatal(4, "Failed to start the Let's Encrypt handler on port %s: %v", setting.PortToRedirect, err)
87+
log.Fatal("Failed to start the Let's Encrypt handler on port %s: %v", setting.PortToRedirect, err)
8888
}
8989
}()
9090
server := &http.Server{
@@ -192,13 +192,13 @@ func runWeb(ctx *cli.Context) error {
192192
case setting.FCGI:
193193
listener, err := net.Listen("tcp", listenAddr)
194194
if err != nil {
195-
log.Fatal(4, "Failed to bind %s", listenAddr, err)
195+
log.Fatal("Failed to bind %s: %v", listenAddr, err)
196196
}
197197
defer listener.Close()
198198
err = fcgi.Serve(listener, context2.ClearHandler(m))
199199
case setting.UnixSocket:
200200
if err := os.Remove(listenAddr); err != nil && !os.IsNotExist(err) {
201-
log.Fatal(4, "Failed to remove unix socket directory %s: %v", listenAddr, err)
201+
log.Fatal("Failed to remove unix socket directory %s: %v", listenAddr, err)
202202
}
203203
var listener *net.UnixListener
204204
listener, err = net.ListenUnix("unix", &net.UnixAddr{Name: listenAddr, Net: "unix"})
@@ -209,15 +209,15 @@ func runWeb(ctx *cli.Context) error {
209209
// FIXME: add proper implementation of signal capture on all protocols
210210
// execute this on SIGTERM or SIGINT: listener.Close()
211211
if err = os.Chmod(listenAddr, os.FileMode(setting.UnixSocketPermission)); err != nil {
212-
log.Fatal(4, "Failed to set permission of unix socket: %v", err)
212+
log.Fatal("Failed to set permission of unix socket: %v", err)
213213
}
214214
err = http.Serve(listener, context2.ClearHandler(m))
215215
default:
216-
log.Fatal(4, "Invalid protocol: %s", setting.Protocol)
216+
log.Fatal("Invalid protocol: %s", setting.Protocol)
217217
}
218218

219219
if err != nil {
220-
log.Fatal(4, "Failed to start server: %v", err)
220+
log.Fatal("Failed to start server: %v", err)
221221
}
222222

223223
return nil

cmd/web_graceful.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func runHTTPS(listenAddr, certFile, keyFile string, m http.Handler) error {
3434
var err error
3535
config.Certificates[0], err = tls.LoadX509KeyPair(certFile, keyFile)
3636
if err != nil {
37-
log.Fatal(4, "Failed to load https cert file %s: %v", listenAddr, err)
37+
log.Fatal("Failed to load https cert file %s: %v", listenAddr, err)
3838
}
3939

4040
return gracehttp.Serve(&http.Server{

custom/conf/app.ini.sample

+31-14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
; This file lists the default values used by Gitea
23
; Copy required sections to your own app.ini (default is custom/conf/app.ini)
34
; and modify as needed.
@@ -33,7 +34,7 @@ PREFERRED_LICENSES = Apache License 2.0,MIT License
3334
DISABLE_HTTP_GIT = false
3435
; Value for Access-Control-Allow-Origin header, default is not to present
3536
; WARNING: This maybe harmful to you website if you do not give it a right value.
36-
ACCESS_CONTROL_ALLOW_ORIGIN =
37+
ACCESS_CONTROL_ALLOW_ORIGIN =
3738
; Force ssh:// clone url instead of scp-style uri when default SSH port is used
3839
USE_COMPAT_SSH_URI = false
3940
; Close issues as long as a commit on any branch marks it as fixed
@@ -260,7 +261,7 @@ ISSUE_INDEXER_TYPE = bleve
260261
ISSUE_INDEXER_PATH = indexers/issues.bleve
261262
; Issue indexer queue, currently support: channel or levelqueue, default is levelqueue
262263
ISSUE_INDEXER_QUEUE_TYPE = levelqueue
263-
; When ISSUE_INDEXER_QUEUE_TYPE is levelqueue, this will be the queue will be saved path,
264+
; When ISSUE_INDEXER_QUEUE_TYPE is levelqueue, this will be the queue will be saved path,
264265
; default is indexers/issues.queue
265266
ISSUE_INDEXER_QUEUE_DIR = indexers/issues.queue
266267
; Batch queue number, default is 20
@@ -390,8 +391,8 @@ NO_REPLY_ADDRESS = noreply.example.org
390391
; Show Registration button
391392
SHOW_REGISTRATION_BUTTON = true
392393
; Default value for AutoWatchNewRepos
393-
; When adding a repo to a team or creating a new repo all team members will watch the
394-
; repo automatically if enabled
394+
; When adding a repo to a team or creating a new repo all team members will watch the
395+
; repo automatically if enabled
395396
AUTO_WATCH_NEW_REPOS = true
396397

397398
[webhook]
@@ -516,17 +517,37 @@ ROOT_PATH =
516517
MODE = console
517518
; Buffer length of the channel, keep it as it is if you don't know what it is.
518519
BUFFER_LEN = 10000
519-
; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
520-
LEVEL = Trace
521520
REDIRECT_MACARON_LOG = false
521+
MACARON = file
522+
; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Info"
523+
ROUTER_LOG_LEVEL = Info
524+
ROUTER = console
525+
ENABLE_ACCESS_LOG = false
526+
ACCESS_LOG_TEMPLATE = {{.Ctx.RemoteAddr}} - {{.Identity}} {{.Start.Format "[02/Jan/2006:15:04:05 -0700]" }} "{{.Ctx.Req.Method}} {{.Ctx.Req.RequestURI}} {{.Ctx.Req.Proto}}" {{.ResponseWriter.Status}} {{.ResponseWriter.Size}} "{{.Ctx.Req.Referer}}\" \"{{.Ctx.Req.UserAgent}}"
527+
ACCESS = file
528+
; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
529+
LEVEL = Info
530+
; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "None"
531+
STACKTRACE_LEVEL = None
532+
533+
; Generic log modes
534+
[log.x]
535+
FLAGS = stdflags
536+
EXPRESSION =
537+
PREFIX =
538+
COLORIZE = false
522539

523540
; For "console" mode only
524541
[log.console]
525542
LEVEL =
543+
STDERR = false
526544

527545
; For "file" mode only
528546
[log.file]
529547
LEVEL =
548+
; Set the file_name for the logger. If this is a relative path this
549+
; will be relative to ROOT_PATH
550+
FILE_NAME =
530551
; This enables automated log rotate(switch of following options), default is true
531552
LOG_ROTATE = true
532553
; Max number of lines in a single file, default is 1000000
@@ -537,6 +558,10 @@ MAX_SIZE_SHIFT = 28
537558
DAILY_ROTATE = true
538559
; delete the log file after n days, default is 7
539560
MAX_DAYS = 7
561+
; compress logs with gzip
562+
COMPRESS = true
563+
; compression level see godoc for compress/gzip
564+
COMPRESSION_LEVEL = -1
540565

541566
; For "conn" mode only
542567
[log.conn]
@@ -564,14 +589,6 @@ PASSWD =
564589
; Receivers, can be one or more, e.g. [email protected],[email protected]
565590
RECEIVERS =
566591

567-
; For "database" mode only
568-
[log.database]
569-
LEVEL =
570-
; Either "mysql" or "postgres"
571-
DRIVER =
572-
; Based on xorm, e.g.: root:root@localhost/gitea?charset=utf8
573-
CONN =
574-
575592
[cron]
576593
; Enable running cron tasks periodically.
577594
ENABLED = true

docs/content/doc/advanced/config-cheat-sheet.en-us.md

+61-3
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,12 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`.
6868
- `DEFAULT_CLOSE_ISSUES_VIA_COMMITS_IN_ANY_BRANCH`: **false**: Close an issue if a commit on a non default branch marks it as closed.
6969

7070
### Repository - Pull Request (`repository.pull-request`)
71+
7172
- `WORK_IN_PROGRESS_PREFIXES`: **WIP:,\[WIP\]**: List of prefixes used in Pull Request
7273
title to mark them as Work In Progress
7374

7475
### Repository - Issue (`repository.issue`)
76+
7577
- `LOCK_REASONS`: **Too heated,Off-topic,Resolved,Spam**: A list of reasons why a Pull Request or Issue can be locked
7678

7779
## UI (`ui`)
@@ -287,9 +289,65 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`.
287289
## Log (`log`)
288290

289291
- `ROOT_PATH`: **\<empty\>**: Root path for log files.
290-
- `MODE`: **console**: Logging mode. For multiple modes, use a comma to separate values.
291-
- `LEVEL`: **Trace**: General log level. \[Trace, Debug, Info, Warn, Error, Critical\]
292-
- `REDIRECT_MACARON_LOG`: **false**: Redirects the Macaron log to the Gitea logger.
292+
- `MODE`: **console**: Logging mode. For multiple modes, use a comma to separate values. You can configure each mode in per mode log subsections `\[log.modename\]`. By default the file mode will log to `$ROOT_PATH/gitea.log`.
293+
- `LEVEL`: **Info**: General log level. \[Trace, Debug, Info, Warn, Error, Critical, Fatal, None\]
294+
- `STACKTRACE_LEVEL`: **None**: Default log level at which to log create stack traces. \[Trace, Debug, Info, Warn, Error, Critical, Fatal, None\]
295+
- `REDIRECT_MACARON_LOG`: **false**: Redirects the Macaron log to its own logger or the default logger.
296+
- `MACARON`: **file**: Logging mode for the macaron logger, use a comma to separate values. Configure each mode in per mode log subsections `\[log.modename.macaron\]`. By default the file mode will log to `$ROOT_PATH/macaron.log`. (If you set this to `,` it will log to default gitea logger.)
297+
- `ROUTER_LOG_LEVEL`: **Info**: The log level that the router should log at. (If you are setting the access log, its recommended to place this at Debug.)
298+
- `ROUTER`: **console**: The mode or name of the log the router should log to. (If you set this to `,` it will log to default gitea logger.)
299+
NB: You must `REDIRECT_MACARON_LOG` and have `DISABLE_ROUTER_LOG` set to `false` for this option to take effect. Configure each mode in per mode log subsections `\[log.modename.router\]`.
300+
- `ENABLE_ACCESS_LOG`: **false**: Creates an access.log in NCSA common log format, or as per the following template
301+
- `ACCESS`: **file**: Logging mode for the access logger, use a comma to separate values. Configure each mode in per mode log subsections `\[log.modename.access\]`. By default the file mode will log to `$ROOT_PATH/access.log`. (If you set this to `,` it will log to the default gitea logger.)
302+
- `ACCESS_LOG_TEMPLATE`: **`{{.Ctx.RemoteAddr}} - {{.Identity}} {{.Start.Format "[02/Jan/2006:15:04:05 -0700]" }} "{{.Ctx.Req.Method}} {{.Ctx.Req.RequestURI}} {{.Ctx.Req.Proto}}" {{.ResponseWriter.Status}} {{.ResponseWriter.Size}} "{{.Ctx.Req.Referer}}\" \"{{.Ctx.Req.UserAgent}}"`**: Sets the template used to create the access log.
303+
- The following variables are available:
304+
- `Ctx`: the `macaron.Context` of the request.
305+
- `Identity`: the SignedUserName or `"-"` if not logged in.
306+
- `Start`: the start time of the request.
307+
- `ResponseWriter`: the responseWriter from the request.
308+
- You must be very careful to ensure that this template does not throw errors or panics as this template runs outside of the panic/recovery script.
309+
- `ENABLE_XORM_LOG`: **true**: Set whether to perform XORM logging. Please note SQL statement logging can be disabled by setting `LOG_SQL` to false in the `[database]` section.
310+
311+
### Log subsections (`log.name`, `log.name.*`)
312+
313+
- `LEVEL`: **log.LEVEL**: Sets the log-level of this sublogger. Defaults to the `LEVEL` set in the global `[log]` section.
314+
- `STACKTRACE_LEVEL`: **log.STACKTRACE_LEVEL**: Sets the log level at which to log stack traces.
315+
- `MODE`: **name**: Sets the mode of this sublogger - Defaults to the provided subsection name. This allows you to have two different file loggers at different levels.
316+
- `EXPRESSION`: **""**: A regular expression to match either the function name, file or message. Defaults to empty. Only log messages that match the expression will be saved in the logger.
317+
- `FLAGS`: **stdflags**: A comma separated string representing the log flags. Defaults to `stdflags` which represents the prefix: `2009/01/23 01:23:23 ...a/b/c/d.go:23:runtime.Caller() [I]: message`. `none` means don't prefix log lines. See `modules/log/base.go` for more information.
318+
- `PREFIX`: **""**: An additional prefix for every log line in this logger. Defaults to empty.
319+
- `COLORIZE`: **false**: Colorize the log lines by default
320+
321+
### Console log mode (`log.console`, `log.console.*`, or `MODE=console`)
322+
323+
- For the console logger `COLORIZE` will default to `true` if not on windows.
324+
- `STDERR`: **false**: Use Stderr instead of Stdout.
325+
326+
### File log mode (`log.file`, `log.file.*` or `MODE=file`)
327+
328+
- `FILE_NAME`: Set the file name for this logger. Defaults as described above. If relative will be relative to the `ROOT_PATH`
329+
- `LOG_ROTATE`: **true**: Rotate the log files.
330+
- `MAX_SIZE_SHIFT`: **28**: Maximum size shift of a single file, 28 represents 256Mb.
331+
- `DAILY_ROTATE`: **true**: Rotate logs daily.
332+
- `MAX_DAYS`: **7**: Delete the log file after n days
333+
- NB: `COLORIZE`: will default to `true` if not on windows.
334+
- `COMPRESS`: **true**: Compress old log files by default with gzip
335+
- `COMPRESSION_LEVEL`: **-1**: Compression level
336+
337+
### Conn log mode (`log.conn`, `log.conn.*` or `MODE=conn`)
338+
339+
- `RECONNECT_ON_MSG`: **false**: Reconnect host for every single message.
340+
- `RECONNECT`: **false**: Try to reconnect when connection is lost.
341+
- `PROTOCOL`: **tcp**: Set the protocol, either "tcp", "unix" or "udp".
342+
- `ADDR`: **:7020**: Sets the address to connect to.
343+
344+
### SMTP log mode (`log.smtp`, `log.smtp.*` or `MODE=smtp`)
345+
346+
- `USER`: User email address to send from.
347+
- `PASSWD`: Password for the smtp server.
348+
- `HOST`: **127.0.0.1:25**: The SMTP host to connect to.
349+
- `RECEIVERS`: Email addresses to send to.
350+
- `SUBJECT`: **Diagnostic message from Gitea**
293351

294352
## Cron (`cron`)
295353

go.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ require (
7979
github.com/lunny/log v0.0.0-20160921050905-7887c61bf0de // indirect
8080
github.com/lunny/nodb v0.0.0-20160621015157-fc1ef06ad4af // indirect
8181
github.com/markbates/goth v1.49.0
82+
github.com/mattn/go-isatty v0.0.7
8283
github.com/mattn/go-oci8 v0.0.0-20190320171441-14ba190cf52d // indirect
8384
github.com/mattn/go-sqlite3 v1.10.0
8485
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
@@ -114,8 +115,7 @@ require (
114115
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793
115116
golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519
116117
golang.org/x/oauth2 v0.0.0-20181101160152-c453e0c75759 // indirect
117-
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f
118-
golang.org/x/sys v0.0.0-20181026144532-2772b66316d2
118+
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223
119119
golang.org/x/text v0.3.0
120120
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
121121
gopkg.in/asn1-ber.v1 v1.0.0-20150924051756-4e86f4367175 // indirect

go.sum

+4-2
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,8 @@ github.com/lunny/nodb v0.0.0-20160621015157-fc1ef06ad4af/go.mod h1:Cqz6pqow14VOb
207207
github.com/markbates/going v1.0.0/go.mod h1:I6mnB4BPnEeqo85ynXIx1ZFLLbtiLHNXVgWeFO9OGOA=
208208
github.com/markbates/goth v1.49.0 h1:qQ4Ti4WaqAxNAggOC+4s5M85sMVfMJwQn/Xkp73wfgI=
209209
github.com/markbates/goth v1.49.0/go.mod h1:zZmAw0Es0Dpm7TT/4AdN14QrkiWLMrrU9Xei1o+/mdA=
210+
github.com/mattn/go-isatty v0.0.7 h1:UvyT9uN+3r7yLEYSlJsbQGdsaB/a0DlgWP3pql6iwOc=
211+
github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
210212
github.com/mattn/go-oci8 v0.0.0-20190320171441-14ba190cf52d h1:m+dSK37rFf2fqppZhg15yI2IwC9BtucBiRwSDm9VL8g=
211213
github.com/mattn/go-oci8 v0.0.0-20190320171441-14ba190cf52d/go.mod h1:/M9VLO+lUPmxvoOK2PfWRZ8mTtB4q1Hy9lEGijv9Nr8=
212214
github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
@@ -311,8 +313,8 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6Zh
311313
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
312314
golang.org/x/sys v0.0.0-20180903190138-2b024373dcd9/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
313315
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
314-
golang.org/x/sys v0.0.0-20181026144532-2772b66316d2 h1:W7CqTdBJ1CmxLKe7LptKDnBYV6PHrVLiGnoyBjaG/JQ=
315-
golang.org/x/sys v0.0.0-20181026144532-2772b66316d2/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
316+
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223 h1:DH4skfRX4EBpamg7iV4ZlCpblAHI6s6TDM39bFZumv8=
317+
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
316318
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
317319
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
318320
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=

main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ arguments - which can alternatively be run by running the subcommand web.`
5656
app.Action = cmd.CmdWeb.Action
5757
err := app.Run(os.Args)
5858
if err != nil {
59-
log.Fatal(4, "Failed to run app with %s: %v", os.Args, err)
59+
log.Fatal("Failed to run app with %s: %v", os.Args, err)
6060
}
6161
}
6262

0 commit comments

Comments
 (0)