mirror of
https://github.com/octoleo/syncthing.git
synced 2025-02-02 11:58:28 +00:00
parent
a992559abc
commit
4e22a96602
@ -548,6 +548,14 @@ func upgradeViaRest() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func syncthingMain(runtimeOptions RuntimeOptions) {
|
func syncthingMain(runtimeOptions RuntimeOptions) {
|
||||||
|
// Set a log prefix similar to the ID we will have later on, or early log
|
||||||
|
// lines look ugly.
|
||||||
|
l.SetPrefix("[start] ")
|
||||||
|
|
||||||
|
// Print our version information up front, so any crash that happens
|
||||||
|
// early etc. will have it available.
|
||||||
|
l.Infoln(build.LongVersion)
|
||||||
|
|
||||||
// Ensure that we have a certificate and key.
|
// Ensure that we have a certificate and key.
|
||||||
cert, err := syncthing.LoadOrGenerateCertificate(
|
cert, err := syncthing.LoadOrGenerateCertificate(
|
||||||
locations.Get(locations.CertFile),
|
locations.Get(locations.CertFile),
|
||||||
|
@ -121,10 +121,6 @@ func (a *App) startup() error {
|
|||||||
})
|
})
|
||||||
a.mainService.ServeBackground()
|
a.mainService.ServeBackground()
|
||||||
|
|
||||||
// Set a log prefix similar to the ID we will have later on, or early log
|
|
||||||
// lines look ugly.
|
|
||||||
l.SetPrefix("[start] ")
|
|
||||||
|
|
||||||
if a.opts.AuditWriter != nil {
|
if a.opts.AuditWriter != nil {
|
||||||
a.mainService.Add(newAuditService(a.opts.AuditWriter))
|
a.mainService.Add(newAuditService(a.opts.AuditWriter))
|
||||||
}
|
}
|
||||||
@ -147,10 +143,9 @@ func (a *App) startup() error {
|
|||||||
// report the error if there is one.
|
// report the error if there is one.
|
||||||
osutil.MaximizeOpenFileLimit()
|
osutil.MaximizeOpenFileLimit()
|
||||||
|
|
||||||
|
// Figure out our device ID, set it as the log prefix and log it.
|
||||||
a.myID = protocol.NewDeviceID(a.cert.Certificate[0])
|
a.myID = protocol.NewDeviceID(a.cert.Certificate[0])
|
||||||
l.SetPrefix(fmt.Sprintf("[%s] ", a.myID.String()[:5]))
|
l.SetPrefix(fmt.Sprintf("[%s] ", a.myID.String()[:5]))
|
||||||
|
|
||||||
l.Infoln(build.LongVersion)
|
|
||||||
l.Infoln("My ID:", a.myID)
|
l.Infoln("My ID:", a.myID)
|
||||||
|
|
||||||
// Select SHA256 implementation and report. Affected by the
|
// Select SHA256 implementation and report. Affected by the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user