From 9f8e448153b9b35a36063c5a2a659c139ff0e31d Mon Sep 17 00:00:00 2001 From: Alexander Batischev Date: Tue, 27 Jul 2021 21:47:37 +0300 Subject: feat: configure log verbosity with OBNAM_SERVER_LOG envvar Fixes #117. --- obnam.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'obnam.md') diff --git a/obnam.md b/obnam.md index decb28c..aba2110 100644 --- a/obnam.md +++ b/obnam.md @@ -1124,6 +1124,31 @@ and chunk-meta is {"sha256":"abc","generation":null,"ended":null} and the body matches file data.dat ~~~ + +## Obeys `OBNAM_SERVER_LOG` environment variable + +The chunk server logs its actions to stderr. Verbosity of the log depends on the +`OBNAM_SERVER_LOG` envvar. This scenario verifies that the variable can make the +server more chatty. + +~~~scenario +given an installed obnam +and a running chunk server +and a file data1.dat containing some random data +when I POST data1.dat to /chunks, with chunk-meta: {"sha256":"qwerty"} +then the JSON body has a field chunk_id, henceforth ID +and chunk server's stderr doesn't contain "Obnam server starting up" +and chunk server's stderr doesn't contain "created chunk " + +given a running chunk server with environment {"OBNAM_SERVER_LOG": "info"} +and a file data2.dat containing some random data +when I POST data2.dat to /chunks, with chunk-meta: {"sha256":"xyz"} +then the JSON body has a field chunk_id, henceforth ID +and chunk server's stderr contains "Obnam server starting up" +and chunk server's stderr contains "created chunk " +~~~ + + # Acceptance criteria for the Obnam client The scenarios in chapter verify that the Obnam client works as it -- cgit v1.2.1