mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
Log to TOR_PT_STATE_LOCATION
This commit is contained in:
parent
ac9d49b872
commit
6cecd31fd8
1 changed files with 6 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue