Browse code

Merge pull request #29688 from tronicum/since-flag

explain since format and give examples

Brian Goff authored on 2017/01/09 23:27:30
Showing 2 changed files
... ...
@@ -37,7 +37,7 @@ func NewLogsCommand(dockerCli *command.DockerCli) *cobra.Command {
37 37
 
38 38
 	flags := cmd.Flags()
39 39
 	flags.BoolVarP(&opts.follow, "follow", "f", false, "Follow log output")
40
-	flags.StringVar(&opts.since, "since", "", "Show logs since timestamp")
40
+	flags.StringVar(&opts.since, "since", "", "Show logs since timestamp (e.g. 2013-01-02T13:23:37) or relative (e.g. 42m for 42 minutes)")
41 41
 	flags.BoolVarP(&opts.timestamps, "timestamps", "t", false, "Show timestamps")
42 42
 	flags.BoolVar(&opts.details, "details", false, "Show extra details provided to logs")
43 43
 	flags.StringVar(&opts.tail, "tail", "all", "Number of lines to show from the end of the logs")
... ...
@@ -24,8 +24,8 @@ Options:
24 24
       --details        Show extra details provided to logs
25 25
   -f, --follow         Follow log output
26 26
       --help           Print usage
27
-      --since string   Show logs since timestamp
28
-      --tail string    Number of lines to show from the end of the logs (default "all")
27
+      --since string   Show logs since timestamp (e.g. 2013-01-02T13:23:37) or relative (e.g. 42m for 42 minutes)
28
+      --tail string    Number of lines to show from the end of the logs (default "all") 
29 29
   -t, --timestamps     Show timestamps
30 30
 ```
31 31