diff --git a/README.md b/README.md index cf4920f..ebb5ae6 100644 --- a/README.md +++ b/README.md @@ -45,16 +45,27 @@ saml_tools.sh Bash script ``cget.sh`` retrieves and caches HTTP resources on disk. A previously cached resource is retrieved via HTTP Conditional GET [RFC 7232]. If the web server responds with HTTP 200 OK, the resource is cached and written to stdout. If the web server responds with 304 Not Modified, the cached resource is output instead. -To illustrate, define a couple of HTTP resources, a cache, and a log file: +First let's configure logging. For convenience, we will log directly to the terminal: + +```Shell +$ export LOG_FILE=/dev/tty +``` + +The system defaults to INFO logging, which corresponds to ``LOG_LEVEL=3``. We make that explicit as follows: + +```Shell +$ export LOG_LEVEL=3 +``` + +Next we define a couple of HTTP resources and a cache: ```Shell $ url1=http://md.incommon.org/InCommon/InCommon-metadata-preview.xml $ url2=http://md.incommon.org/InCommon/InCommon-metadata-fallback.xml $ export CACHE_DIR=/tmp/http_cache -$ export LOG_FILE=/dev/tty ``` -GET the first resource: +Now GET the first resource: ```Shell $ $BIN_DIR/cget.sh $url1 > /dev/null