Commit 6cecd31f authored by Arlo Breault's avatar Arlo Breault
Browse files

Log to TOR_PT_STATE_LOCATION

parent ac9d49b8
......@@ -9,6 +9,7 @@ import (
"net"
"os"
"os/signal"
"path"
"sync"
"syscall"
"time"
......@@ -121,7 +122,11 @@ func copyLoop(a, b io.ReadWriter) {
func main() {
webrtc.SetLoggingVerbosity(1)
logFile, err := os.OpenFile("snowflake.log",
stateDir, err := pt.MakeStateDir()
if err != nil {
log.Fatal(err)
}
logFile, err := os.OpenFile(path.Join(stateDir, "snowflake.log"),
os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0600)
if err != nil {
log.Fatal(err)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment