mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-08-24 10:13:39 -05:00
allow configuring number of logs to tail
This commit is contained in:
+2
-1
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user