summaryrefslogtreecommitdiffstats
path: root/main.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-09-26 10:23:10 +1000
committerJesse Duffield <jessedduffield@gmail.com>2020-09-26 11:00:50 +1000
commit077f11361805417c15234c62a9f9aa022f913d43 (patch)
tree2cf25beba4f96b55392f09d733a14c25c149de07 /main.go
parent0c6cbe7746660155df0645f01d37150099d21f49 (diff)
add in-built logging support for a better dev experience
Diffstat (limited to 'main.go')
-rw-r--r--main.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/main.go b/main.go
index fc41dd893..668d8bab8 100644
--- a/main.go
+++ b/main.go
@@ -41,6 +41,9 @@ func main() {
configFlag := false
flaggy.Bool(&configFlag, "c", "config", "Print the default config")
+ logFlag := false
+ flaggy.Bool(&logFlag, "l", "logs", "Tail lazygit logs (intended to be used in a separate terminal tab to lazygit)")
+
flaggy.Parse()
if versionFlag {
@@ -53,6 +56,11 @@ func main() {
os.Exit(0)
}
+ if logFlag {
+ app.TailLogs()
+ os.Exit(0)
+ }
+
if repoPath != "." {
if err := os.Chdir(repoPath); err != nil {
log.Fatal(err.Error())