mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-22 15:11:02 +00:00
Merge pull request #405 from jesseduffield/tail-logs-configurable
This commit is contained in:
commit
d777bfe655
3 changed files with 5 additions and 1 deletions
|
|
@ -38,7 +38,8 @@ gui:
|
|||
expandFocusedSidePanel: false
|
||||
logs:
|
||||
timestamps: false
|
||||
since: '60m'
|
||||
since: '60m' # set to '' to show all logs
|
||||
tail: '' # set to 200 to show last 200 lines of logs
|
||||
commandTemplates:
|
||||
dockerCompose: docker-compose
|
||||
restartService: '{{ .DockerCompose }} restart {{ .Service.Name }}'
|
||||
|
|
|
|||
|
|
@ -324,6 +324,7 @@ type CustomCommand struct {
|
|||
type LogsConfig struct {
|
||||
Timestamps bool `yaml:"timestamps,omitempty"`
|
||||
Since string `yaml:"since,omitempty"`
|
||||
Tail string `yaml:"tail,omitempty"`
|
||||
}
|
||||
|
||||
// GetDefaultConfig returns the application default configuration NOTE (to
|
||||
|
|
@ -359,6 +360,7 @@ func GetDefaultConfig() UserConfig {
|
|||
Logs: LogsConfig{
|
||||
Timestamps: false,
|
||||
Since: "60m",
|
||||
Tail: "",
|
||||
},
|
||||
CommandTemplates: CommandTemplatesConfig{
|
||||
DockerCompose: "docker-compose",
|
||||
|
|
|
|||
|
|
@ -110,6 +110,7 @@ func (gui *Gui) writeContainerLogs(container *commands.Container, ctx context.Co
|
|||
ShowStderr: true,
|
||||
Timestamps: gui.Config.UserConfig.Logs.Timestamps,
|
||||
Since: gui.Config.UserConfig.Logs.Since,
|
||||
Tail: gui.Config.UserConfig.Logs.Tail,
|
||||
Follow: true,
|
||||
})
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue