From 44a0770215bdd91a780e267e70431762d2c5b5e1 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Tue, 12 Feb 2019 22:57:48 -0500 Subject: [PATCH] document logging methods --- README.md | 2 +- docs/MANUAL.md | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ed3873c7..f0d44db1 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ You can use the `--conf` parameter when launching Oragono to control where it lo ### Logs -By default, logs are stored in the file `ircd.log`. The configuration format of logs is designed to be easily pluggable, and is inspired by the logging config provided by InspIRCd. +By default, logs go to stderr only. They can be configured to go to a file, or you can use systemd to direct the stderr to the system journal (see the manual for details). The configuration format of logs is designed to be easily pluggable, and is inspired by the logging config provided by InspIRCd. ### Passwords diff --git a/docs/MANUAL.md b/docs/MANUAL.md index ddb5c26c..ee88a15d 100644 --- a/docs/MANUAL.md +++ b/docs/MANUAL.md @@ -103,9 +103,16 @@ To get started with Oragono on macOS, Linux, or on a Raspberry Pi: To start the server, type `./oragono run` and hit enter, and the server should be ready to use! -If you're using Arch Linux, you can also install the [`oragono` package](https://aur.archlinux.org/packages/oragono/) from the AUR. This lets you bypass the above process and bundles a systemd service file for easily starting the server. +If you're using Arch Linux, you can also install the [`oragono` package](https://aur.archlinux.org/packages/oragono/) from the AUR. -If you're rolling your own deployment, here's another [example](https://github.com/darwin-network/slash/blob/master/etc/systemd/system/ircd.service) of a systemd unit file that can be used to run Oragono as an unprivileged role user. + +## Running oragono as a service on Linux + +The recommended way to operate oragono as a service on Linux is via systemd. This provides a standard interface for starting, stopping, and rehashing (via `systemctl reload`) the service. It also captures oragono's loglines (sent to stderr in the default configuration) and writes them to the system journal. + +If you're using Arch, the abovementioned AUR package bundles a systemd file for starting and stopping the server. If you're rolling your own deployment, here's an [example](https://github.com/darwin-network/slash/blob/master/etc/systemd/system/ircd.service) of a systemd unit file that can be used to run Oragono as an unprivileged role user. + +On a non-systemd system, oragono can be configured to log to a file and used [logrotate(8)](https://linux.die.net/man/8/logrotate), since it will reopen its log files (as well as rehashing the config file) upon receiving a SIGHUP. --------------------------------------------------------------------------------------------