From 381bd0fb3b9c9ddddf53831e504f5618a1af730c Mon Sep 17 00:00:00 2001
From: Jan Soukal <soukal@ics.muni.cz>
Date: Thu, 18 Oct 2012 18:23:29 +0200
Subject: [PATCH] uprava dokumentace pro verzi klienta 2.1

---
 src/warden-client/bin/sender.pl               |  2 +-
 src/warden-client/doc/CHANGELOG               |  3 +
 src/warden-client/doc/README                  | 60 ++++++++++++++-----
 src/warden-client/doc/example-receiver.pl.txt |  4 +-
 src/warden-client/doc/example-sender.pl.txt   |  2 +-
 5 files changed, 51 insertions(+), 20 deletions(-)

diff --git a/src/warden-client/bin/sender.pl b/src/warden-client/bin/sender.pl
index d950d63..1881617 100755
--- a/src/warden-client/bin/sender.pl
+++ b/src/warden-client/bin/sender.pl
@@ -39,7 +39,7 @@ switch (int(rand(9) + 0.5)) {
 my $source_type = "";
 switch (int(rand(2) + 0.5)) {
   case 0 { $source_type = 'IP'; }
-  case 1 { $source_type = 'url'; }
+  case 1 { $source_type = 'URL'; }
   case 2 { $source_type = 'Reply-To:'; }
   }
 
diff --git a/src/warden-client/doc/CHANGELOG b/src/warden-client/doc/CHANGELOG
index ee2d0d2..bd4cd2b 100644
--- a/src/warden-client/doc/CHANGELOG
+++ b/src/warden-client/doc/CHANGELOG
@@ -1,5 +1,8 @@
 2012-00-00 v.2.1 stable version
 -------------------------------
+- added WardenClientCommon.pm package containing error-handling and
+  connect-to-server functions
+- added support for error (debug) logging via STDERR and/or Syslog
 - receiving of all types of messages now supported
 - added support for batch processing
 - maximum number of events received ($MAX_RCV_EVENTS_LIMIT) in one batch can 
diff --git a/src/warden-client/doc/README b/src/warden-client/doc/README
index 7a87989..c4cc0c0 100644
--- a/src/warden-client/doc/README
+++ b/src/warden-client/doc/README
@@ -1,5 +1,5 @@
 +----------------------------+
-| README - Warden Client 2.0 |
+| README - Warden Client 2.1 |
 +----------------------------+
 
 Content
@@ -30,7 +30,7 @@ A. Overall Information
  
  2. Version
   
-    2.0 (2012-07-27)
+    2.1 (2012-10-18)
     
  3. Package structure
  
@@ -39,17 +39,18 @@ A. Overall Information
         CHANGELOG
         example-sender.pl.txt
         example-receiver.pl.txt
-	      INSTALL
-	      LICENSE
-	      README
-	      README.cesnet
+	INSTALL
+	LICENSE
+	README
+	README.cesnet
       etc/
         warden-client.conf
-	      package_version
+	package_version
       lib/
         WardenClientConf.pm
         WardenClientSend.pm
         WardenClientReceive.pm  
+        WardenClientCommon.pm
       var/
 
 
@@ -90,16 +91,14 @@ C. Installation (First installation of the Warden client package)
     However, the Warden client uses SSL certificates for security purposes which
     are often not accessible by standard users.
 
-    To solve this issue, the Warden client should be installed under root
-    privileges. It copyies local SSL key and certificate files into 
-    warden-client/etc folder where those are accessible even with standard 
-    privileges.
+    Install script does check the accessibility of SSL certificates to
+    provided user. If these files are restricted, the install script will wait
+    for confirmation. Either privileges to read them must be changed or Warden 
+    client must be run under root.
 
-    Should users want to preserve standard location of certificate files,
-    they are advised to remove key and certificate files after installation
-    from warden-client/etc/ and manually edit paths to certificate files in
-    warden-client/etc/warden-client.conf. In most cases, this change will force
-    the Warden client to be run under root privileges though.
+    Of course, after installation of Warden client, SSL certificates may also be
+    copyied to another location accessible by the user and corresponding paths
+    changed in warden-client/etc/warden-client.conf.
 
  5. Configuration file
 
@@ -219,6 +218,31 @@ F. Configuration
                          - default set to 6000, which generates app. 250 MB
                            of memory consumption.
                          - only affects "receiving" clients
+                         - Note: server returns the lower number from client's
+                           MAX_RCV_EVENTS_LIMIT and server's internal maximum
+                           size of batch. Contact your Warden server
+                           administrator if you need to know Warden server
+                           batch limits.
+
+    Since Warden client 2.1 there is also possibility to log status and other
+    information either to STDERR of Syslog.
+
+    LOG_STDERR           - if set to 1 (default), all status information and
+                           possible error will be printed to STDERR
+                         - to disable, set LOG_STDERR to 0
+
+    LOG_SYSLOG           - if set to 1, all status information and possible
+                           errors will be reported to Syslog
+                         - default is 0, which means that reporting to Syslog
+                           is disabled
+    
+    LOG_SYSLOG_FACILITY  - facility to use when logging via Syslog
+                         - deafult is "local7"
+
+    LOG_VERBOSE          - when set to 1, also debug information (such as stack
+                           dump) will be printed when logging.
+                         - default is 0, which means that verbose mode is
+                           disabled
 
 
 --------------------------------------------------------------------------------
@@ -439,6 +463,10 @@ I. Functions, Arguments and Calls
     explained in section I. 1. WardenClientSend::saveNewEvent. It has one 
     additional attribute ID - unique id of this particular event (BIGINT).
 
+    Amount of events received in each batch equals to MAX_RCV_EVENTS_LIMIT
+    value set in warden-client/etc/warden-client.conf. For more information see
+    section F. Configuration.
+
 --------------------------------------------------------------------------------
 
 Copyright (C) 2011-2012 Cesnet z.s.p.o
diff --git a/src/warden-client/doc/example-receiver.pl.txt b/src/warden-client/doc/example-receiver.pl.txt
index 71809f6..090e9a9 100755
--- a/src/warden-client/doc/example-receiver.pl.txt
+++ b/src/warden-client/doc/example-receiver.pl.txt
@@ -7,7 +7,7 @@
 use strict;
 
 #------------------------------------------------------------------------------
-# Warden 2.0 Client, Receiver, Example
+# Warden 2.1 Client, Receiver, Example
 #
 # Simple use of warden-client receiver functionality to download new events
 # from # Warden server. This code illustrates how to integrate warden-client
@@ -18,7 +18,7 @@ use strict;
 # This code should developer add into his/her application.
 
 # Path to warden-client directory
-my $warden_path = '/home/soukal/client-test/2.0.0_beta/warden-client/';
+my $warden_path = '/opt/warden-client/';
 
 # Inclusion of warden-client receiving functionality
 require $warden_path . '/lib/WardenClientReceive.pm';
diff --git a/src/warden-client/doc/example-sender.pl.txt b/src/warden-client/doc/example-sender.pl.txt
index 79bae98..40af31a 100644
--- a/src/warden-client/doc/example-sender.pl.txt
+++ b/src/warden-client/doc/example-sender.pl.txt
@@ -8,7 +8,7 @@ use strict;
 use DateTime;
 
 #-------------------------------------------------------------------------------
-# Warden 2.0. Client, Sender, Example 
+# Warden 2.1. Client, Sender, Example 
 #
 # Sample script using warden-client sending functionality. This example is not
 # intended to be a standalone script. It only shows how to use warden-client
-- 
GitLab