mirror of
https://blitiri.com.ar/repos/chasquid
synced 2026-01-24 20:15:56 +00:00
log: Replace glog with a new logging module
glog works fine and has great features, but it does not play along well with systemd or standard log rotators (as it does the rotation itself). So this patch replaces glog with a new logging module "log", which by default logs to stderr, in a systemd-friendly manner. Logging to files or syslog is still supported.
This commit is contained in:
@@ -10,7 +10,7 @@ add_user user@testserver secretpassword
|
||||
add_user someone@testserver secretpassword
|
||||
|
||||
mkdir -p .logs
|
||||
chasquid -v=2 --log_dir=.logs --config_dir=config &
|
||||
chasquid -v=2 --logfile=.logs/chasquid.log --config_dir=config &
|
||||
wait_until_ready 1025
|
||||
|
||||
run_msmtp someone@testserver < content
|
||||
|
||||
@@ -45,7 +45,7 @@ add_user someone@srv-chasquid secretpassword
|
||||
# Use outgoing port 2025 which is where exim will be at.
|
||||
# Bypass MX lookup, so it can find srv-exim (via our host alias).
|
||||
mkdir -p .logs
|
||||
chasquid -v=2 --log_dir=.logs --config_dir=config \
|
||||
chasquid -v=2 --logfile=.logs/chasquid.log --config_dir=config \
|
||||
--testing__outgoing_smtp_port=2025 &
|
||||
|
||||
wait_until_ready 1025
|
||||
|
||||
@@ -14,7 +14,7 @@ go run addtoqueue.go --queue_dir=.data/queue \
|
||||
generate_certs_for testserver
|
||||
|
||||
mkdir -p .logs
|
||||
chasquid -v=2 --log_dir=.logs --config_dir=config &
|
||||
chasquid -v=2 --logfile=.logs/chasquid.log --config_dir=config &
|
||||
wait_until_ready 1025
|
||||
|
||||
# Check that the item in the queue was delivered.
|
||||
|
||||
@@ -9,7 +9,7 @@ generate_certs_for testserver
|
||||
add_user user@testserver secretpassword
|
||||
|
||||
mkdir -p .logs
|
||||
chasquid -v=2 --log_dir=.logs --config_dir=config &
|
||||
chasquid -v=2 --logfile=.logs/chasquid.log --config_dir=config &
|
||||
wait_until_ready 1025
|
||||
|
||||
function send_and_check() {
|
||||
|
||||
@@ -9,7 +9,7 @@ generate_certs_for testserver
|
||||
add_user user@testserver secretpassword
|
||||
|
||||
mkdir -p .logs
|
||||
chasquid -v=2 --log_dir=.logs --config_dir=config &
|
||||
chasquid -v=2 --logfile=.logs/chasquid.log --config_dir=config &
|
||||
wait_until_ready 1025
|
||||
|
||||
|
||||
|
||||
@@ -23,9 +23,9 @@ CONFDIR=B add_user nadaB@nadaB nadaB
|
||||
|
||||
mkdir -p .logs-A .logs-B
|
||||
|
||||
chasquid -v=2 --log_dir=.logs-A --config_dir=A \
|
||||
chasquid -v=2 --logfile=.logs-A/chasquid.log --config_dir=A \
|
||||
--testing__outgoing_smtp_port=2025 &
|
||||
chasquid -v=2 --log_dir=.logs-B --config_dir=B \
|
||||
chasquid -v=2 --logfile=.logs-B/chasquid.log --config_dir=B \
|
||||
--testing__outgoing_smtp_port=1025 &
|
||||
|
||||
wait_until_ready 1025
|
||||
|
||||
@@ -21,7 +21,7 @@ add_user ñangapirí@ñoñOS antaño
|
||||
add_user nada@nada nada
|
||||
|
||||
mkdir -p .logs
|
||||
chasquid -v=2 --log_dir=.logs --config_dir=config &
|
||||
chasquid -v=2 --logfile=.logs/chasquid.log --config_dir=config &
|
||||
wait_until_ready 1025
|
||||
|
||||
# The envelope from and to are taken from the content, and use a mix of upper
|
||||
|
||||
@@ -21,9 +21,9 @@ CONFDIR=B generate_certs_for srv-B
|
||||
|
||||
mkdir -p .logs-A .logs-B
|
||||
|
||||
chasquid -v=2 --log_dir=.logs-A --config_dir=A \
|
||||
chasquid -v=2 --logfile=.logs-A/chasquid.log --config_dir=A \
|
||||
--testing__outgoing_smtp_port=2025 &
|
||||
chasquid -v=2 --log_dir=.logs-B --config_dir=B \
|
||||
chasquid -v=2 --logfile=.logs-B/chasquid.log --config_dir=B \
|
||||
--testing__outgoing_smtp_port=1025 &
|
||||
|
||||
wait_until_ready 1025
|
||||
|
||||
@@ -11,7 +11,7 @@ add_user someone@testserver secretpassword
|
||||
add_user blockme@testserver secretpassword
|
||||
|
||||
mkdir -p .logs
|
||||
chasquid -v=2 --log_dir=.logs --config_dir=config &
|
||||
chasquid -v=2 --logfile=.logs/chasquid.log --config_dir=config &
|
||||
wait_until_ready 1025
|
||||
|
||||
cp config/hooks/post-data.good config/hooks/post-data
|
||||
|
||||
Reference in New Issue
Block a user