# 使用 Homebrew, MacPorts, Nix, apt 安装 zlog

查看 zlog 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:zlog
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install zlog
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install zlog
```

  证据: MacPorts ports tree: devel/zlog/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#zlog
```

  证据: nixpkgs package indexes: pkgs/by-name/zl/zlog/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- Debian apt (92%):

```sh
sudo apt install libzlog-dev
```

  证据: Debian stable package indexes: libzlog-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

## 软件包事实

- **软件包键:** brew:zlog
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/zlog>
- **版本:** 1.2.18
- **来源摘要:** High-performance C logging library
- **主页:** <https://github.com/HardySimpson/zlog>
- **仓库:** <https://github.com/HardySimpson/zlog>
- **许可证:** Apache-2.0
- **源码归档:** <https://github.com/HardySimpson/zlog/archive/refs/tags/1.2.18.tar.gz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- zlog-chk-conf (cli)
- zlog-chk-conf (别名)

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, monterey, sonoma, ventura, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 1.2.18
- 本地数据: OK
- 上游仓库: https://github.com/HardySimpson/zlog
- 检测到的最新版本: 1.2.18 (当前)
- 信息: No package-manager update timestamp was available.
## 项目历史与用法

zlog is a pure-C logging library by Hardy Simpson, written to provide application-style logging features for C programs without external dependencies beyond POSIX and C runtime facilities.

### 项目历史

The GitHub repository was created in 2011. The README and user's guide explain the author's motivation directly: printf is hard to redirect or reformat, syslog is oriented toward system logging, and C lacked a convenient logging library comparable to logback or log4cxx for application developers.

The library's model centers on categories, formats, and rules. That makes it closer to configurable application logging frameworks than to a tiny header-only debug macro.

### 采用历史

Public source material is thin, but zlog persisted as a packaged C library because it solved a narrow systems-programming need: configurable, thread-aware logging with file rotation, multiple destinations, and a small dependency footprint.

### 使用方式

A C program initializes zlog with a configuration file, obtains a category, writes messages through zlog macros or functions, and finalizes the library during shutdown. Configuration rules decide level, destination, and format, so logging behavior can change without recompiling the application.

The bundled zlog-chk-conf utility is useful for checking configuration files before an application relies on them.

### 为什么软件包爱好者会关心

zlog is package-nerd glue: not flashy, but exactly the sort of small C library that shows up when older or portable software needs structured logging without adopting a large framework. Its documentation is unusually explicit about why it exists and what it replaces.

### 时间线

- 2011-12-27: The HardySimpson/zlog GitHub repository is created.
- 2010s: Documentation presents zlog as a pure-C alternative to printf, syslog, and log4c-style approaches for application logging.
- 2020s: zlog remains packaged as a small C logging library for Unix-like development environments.

### Related projects

- log4c, log4cxx, logback, syslog, and smaller C logging libraries such as log.c are adjacent points in the logging-library design space.

### 来源

- <https://api.github.com/repos/HardySimpson/zlog>
- <https://github.com/HardySimpson/zlog>
- <https://hardysimpson.github.io/zlog/UsersGuide-EN.html>


## 安全说明

library-like package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- library-like package without higher-risk signals

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** zlog
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## 其他软件包管理器记录

- Debian apt - libzlog-dev - 1.2.18-1+b1: normalized package name match | Debian stable package indexes: libzlog-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | mutli features pure C logging library -- development files | https://github.com/HardySimpson/zlog
- Debian apt - libzlog1 - 1.2.18-1+b1: normalized package name match | Debian stable package indexes: libzlog1 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | mutli features pure C logging library -- runtime library | https://github.com/HardySimpson/zlog
- Nix - zlog: normalized package name match | nixpkgs package indexes: pkgs/by-name/zl/zlog/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- MacPorts - zlog: normalized package name match | MacPorts ports tree: devel/zlog/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## 相关链接

- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://pkg.so/zh-hans/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [log4c](https://pkg.so/zh-hans/brew/log4c/) - Shares pkgdb curated category or tags: c, cli, developer-tools, library, logging.
- [glib](https://pkg.so/zh-hans/brew/glib/) - Shares pkgdb curated category or tags: c, cli, developer-tools, library.
- [libdeflate](https://pkg.so/zh-hans/brew/libdeflate/) - Shares pkgdb curated category or tags: c, cli, developer-tools, library.
- [libdatrie](https://pkg.so/zh-hans/brew/libdatrie/) - Shares pkgdb curated category or tags: c, cli, developer-tools, library.
- [nspr](https://pkg.so/zh-hans/brew/nspr/) - Shares pkgdb curated category or tags: c, cli, developer-tools, library.
- [apr](https://pkg.so/zh-hans/brew/apr/) - Shares pkgdb curated category or tags: c, cli, developer-tools, library.
- [md4c](https://pkg.so/zh-hans/brew/md4c/) - Shares pkgdb curated category or tags: c, cli, developer-tools, library.
- [gflags](https://pkg.so/zh-hans/brew/gflags/) - Shares pkgdb curated category or tags: c, cli, developer-tools, library.
- [fastgron](https://pkg.so/zh-hans/brew/fastgron/) - Local package facts share a topical domain. Shared terms: cli, developer, developer-tools, high, high-performance.
- [krep](https://pkg.so/zh-hans/brew/krep/) - Local package facts share a topical domain. Shared terms: cli, developer, developer-tools, high, high-performance.
- [libucl](https://pkg.so/zh-hans/brew/libucl/) - Local package facts share a topical domain. Shared terms: cli, configuration, developer, developer-tools, library.

## Combined YAML source

View the package source record on GitHub. [combined/zlog.yml](https://github.com/mxcl/pkgdb/blob/main/combined/zlog.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
