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