mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -07:00
fix: different stream style for logs
This commit is contained in:
parent
47e814c9a9
commit
e7687c658f
2 changed files with 55 additions and 5 deletions
|
@ -61,7 +61,13 @@ func (s *EventsStream) Start() error {
|
|||
var e session.Event
|
||||
select {
|
||||
case e = <-s.Session.Events.NewEvents:
|
||||
fmt.Printf("[%s] [%s] %v\n", e.Time.Format("2006-01-02 15:04:05"), core.Green(e.Tag), e.Data)
|
||||
tm := e.Time.Format("2006-01-02 15:04:05")
|
||||
|
||||
if e.Tag == "sys.log" {
|
||||
fmt.Printf("[%s] %s %v\n", tm, e.Label(), e.Data.(session.LogMessage).Message)
|
||||
} else {
|
||||
fmt.Printf("[%s] [%s] %v\n", tm, core.Green(e.Tag), e.Data)
|
||||
}
|
||||
break
|
||||
|
||||
case <-s.quit:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue