2015-06-18 15:22:45 +02:00
|
|
|
// Copyright (C) 2015 The Syncthing Authors.
|
|
|
|
|
//
|
|
|
|
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
|
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
2017-02-09 07:52:18 +01:00
|
|
|
// You can obtain one at https://mozilla.org/MPL/2.0/.
|
2015-06-18 15:22:45 +02:00
|
|
|
|
|
|
|
|
package rc
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"os"
|
|
|
|
|
"strings"
|
|
|
|
|
|
2015-10-03 17:25:21 +02:00
|
|
|
"github.com/syncthing/syncthing/lib/logger"
|
2015-06-18 15:22:45 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
var (
|
2015-10-03 17:25:21 +02:00
|
|
|
l = logger.DefaultLogger.NewFacility("rc", "Remote control package")
|
2015-06-18 15:22:45 +02:00
|
|
|
)
|
2015-10-03 17:25:21 +02:00
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
|
l.SetDebug("rc", strings.Contains(os.Getenv("STTRACE"), "rc") || os.Getenv("STTRACE") == "all")
|
|
|
|
|
}
|