---
source: https://iinventedlight.com/library/notes/go-syslog.md
title: "Go log/syslog: send messages to the system log service"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "BSD-3-Clause (The Go Authors); BSD-3-Clause (The Go Authors); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: The Go Authors, log/syslog; The Go Authors, log/syslog source. BSD-3-Clause (https://go.dev/LICENSE). Copyright The Go Authors."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-26
status: published
approved_by: "Cole Withington, 2026-11-27 14:30 PT: \"Yes, publish all of that now\""
checked_on: 2026-11-26
as_of: 2026-11-26
confidence: medium
untested: "Not reproduced (2026-11-26). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-systems: go-syslog"
tags: [go, syslog, log, unix, dial]
client: Librarian
sources:
  - id: S1
    title: "log/syslog"
    publisher: The Go Authors
    url: https://pkg.go.dev/log/syslog
    accessed: 2026-11-26
    license: "BSD-3-Clause"
  - id: S2
    title: "log/syslog source"
    publisher: The Go Authors
    url: https://go.dev/src/log/syslog/syslog.go
    accessed: 2026-11-26
    license: "BSD-3-Clause"
---
# Go log/syslog: send messages to the system log service
**Answer:** Package log/syslog is a small client for the system log service. It can use UNIX domain sockets, UDP, or TCP to deliver messages.

## How it talks to syslog

Only one call to Dial is necessary.

The client will attempt to reconnect to the server after write failures, then write again.

Some external packages provide more functionality. The syslog package is frozen and is not accepting new features.

New talks to the local syslog server. Dial uses a network and raddr, as documented for net.Dial.

If network is empty, Dial will connect to the local syslog server.

## Priority and helpers

A Priority value combines a severity and a facility.

Writer methods such as Info, Err, and Emerg send a log message.

NewLogger returns a log.Logger built on a syslog priority and log flag.

## See also

- [go-log](https://iinventedlight.com/library/notes/go-log/)
- [python-syslog](https://iinventedlight.com/library/notes/python-syslog/)
- [go-scanner](https://iinventedlight.com/library/notes/go-scanner/)

## Claims

- id: C1
  claim: Only one call to Dial is necessary.
  source: S1
  evidence: "Only one call to Dial is necessary."

- id: C2
  claim: The syslog package is frozen and is not accepting new features.
  source: S1
  evidence: "The syslog package is frozen and is not accepting new features."

- id: C3
  claim: An empty tag is replaced by os.Args[0].
  source: S2
  evidence: "If tag is empty, the [os.Args][0] is used."

## Sources

- [S1] log/syslog. The Go Authors. https://pkg.go.dev/log/syslog . License: BSD-3-Clause. Accessed 2026-11-26.

- [S2] log/syslog source. The Go Authors. https://go.dev/src/log/syslog/syslog.go . License: BSD-3-Clause. Accessed 2026-11-26.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: The Go Authors, log/syslog; The Go Authors, log/syslog source. BSD-3-Clause (https://go.dev/LICENSE). Copyright The Go Authors. Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
