# How to logging?

**URL:** https://forum.syncthing.net/t/how-to-logging/215
**Category:** Support
**Created:** [May 21, 2014, 8:02am UTC](https://forum.syncthing.net/t/how-to-logging/215 "2014-05-21T08:02:16Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![calmh](https://forum.syncthing.net/user_avatar/forum.syncthing.net/calmh/32/15311_2.png) [@calmh](https://forum.syncthing.net/u/calmh)
#### Post date: [May 21, 2014, 12:09pm UTC](https://forum.syncthing.net/t/how-to-logging/215/4 "2014-05-21T12:09:35Z")

</div>

Sure. This is a start script I use with svrun on one of my machines;

```bash
#!/bin/sh

export HOME=/home/jb
export STNORESTART=1
setuidgid jb /home/jb/bin/syncthing 2>&1 | logger -t syncthing

```

When this runs, log output gets sent to regular syslog and can be handled by whatever syslog mechanisms you have in place.

```
jb@syncer:~$ sudo tail -f /var/log/syslog
May 21 14:06:15 syncer syncthing: [LGFPD] 14:06:15 INFO: syncthing v0.8.7-18-ge9eacfa (go1.2.2 linux-amd64) jb@jborg-mbp 2014-05-19 22:59:19 UTC
May 21 14:06:15 syncer syncthing: [LGFPD] 14:06:15 INFO: My ID: LGFPDIT7SKNNJVJZA4FC7QNCRKCE753K72BW5QD2FOZ7FRFEP57Q
May 21 14:06:15 syncer syncthing: [LGFPD] 14:06:15 INFO: Starting web GUI on http://0.0.0.0:8080/
May 21 14:06:15 syncer syncthing: [LGFPD] 14:06:15 INFO: Populating repository index
May 21 14:06:21 syncer syncthing: [LGFPD] 14:06:21 INFO: No UPnP IGD device found, no port mapping created (read udp4 0.0.0.0:46581: i/o timeout)
May 21 14:06:21 syncer syncthing: [LGFPD] 14:06:21 INFO: Sending local discovery announcements

```

We get a double timestamp, one from syncthing and one from syslog. Could have a flag to disable that in case the log data is timestamped externally but I haven’t been sufficiently annoyed by it yet.

---

_[View the full topic](https://forum.syncthing.net/t/how-to-logging/215)._
