feature: Adds basic backend starting for sshappbackend.
This commit is contained in:
parent
a35602a6f2
commit
ede4d528aa
8 changed files with 434 additions and 23 deletions
23
backend/sshappbackend/local-code/logger.go
Normal file
23
backend/sshappbackend/local-code/logger.go
Normal file
|
@ -0,0 +1,23 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/charmbracelet/log"
|
||||
)
|
||||
|
||||
type WriteLogger struct{}
|
||||
|
||||
func (writer WriteLogger) Write(p []byte) (n int, err error) {
|
||||
logSplit := strings.Split(string(p), "\n")
|
||||
|
||||
for _, line := range logSplit {
|
||||
if line == "" {
|
||||
continue
|
||||
}
|
||||
|
||||
log.Infof("Process: %s", line)
|
||||
}
|
||||
|
||||
return len(p), err
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue