mirror of
https://github.com/containers/podman.git
synced 2025-10-19 20:23:08 +08:00
@ -15,7 +15,7 @@ var (
|
|||||||
logsCommand cliconfig.LogsValues
|
logsCommand cliconfig.LogsValues
|
||||||
logsDescription = `Retrieves logs for one or more containers.
|
logsDescription = `Retrieves logs for one or more containers.
|
||||||
|
|
||||||
This does not guarantee execution order when combined with podman run (i.e. your run may not have generated any logs at the time you execute podman logs.
|
This does not guarantee execution order when combined with podman run (i.e. your run may not have generated any logs at the time you execute podman logs).
|
||||||
`
|
`
|
||||||
_logsCommand = &cobra.Command{
|
_logsCommand = &cobra.Command{
|
||||||
Use: "logs [flags] CONTAINER [CONTAINER...]",
|
Use: "logs [flags] CONTAINER [CONTAINER...]",
|
||||||
|
@ -11,7 +11,7 @@ podman\-logs - Display the logs of one or more containers
|
|||||||
## DESCRIPTION
|
## DESCRIPTION
|
||||||
The podman logs command batch-retrieves whatever logs are present for one or more containers at the time of execution.
|
The podman logs command batch-retrieves whatever logs are present for one or more containers at the time of execution.
|
||||||
This does not guarantee execution order when combined with podman run (i.e. your run may not have generated
|
This does not guarantee execution order when combined with podman run (i.e. your run may not have generated
|
||||||
any logs at the time you execute podman logs
|
any logs at the time you execute podman logs).
|
||||||
|
|
||||||
## OPTIONS
|
## OPTIONS
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ func (c *Container) readFromJournal(options *logs.LogOptions, logChannel chan *l
|
|||||||
defaultTime := time.Time{}
|
defaultTime := time.Time{}
|
||||||
if options.Since != defaultTime {
|
if options.Since != defaultTime {
|
||||||
// coreos/go-systemd/sdjournal doesn't correctly handle requests for data in the future
|
// coreos/go-systemd/sdjournal doesn't correctly handle requests for data in the future
|
||||||
// return nothing instead of fasely printing
|
// return nothing instead of falsely printing
|
||||||
if time.Now().Before(options.Since) {
|
if time.Now().Before(options.Since) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user