mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 05: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"
|
"net"
|
||||||
"os"
|
"os"
|
||||||
"os/signal"
|
"os/signal"
|
||||||
|
"path"
|
||||||
"sync"
|
"sync"
|
||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
@ -121,7 +122,11 @@ func copyLoop(a, b io.ReadWriter) {
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
webrtc.SetLoggingVerbosity(1)
|
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)
|
os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0600)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue