summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/samples/learning-more/logging-scribe/README
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-2.x/trunk/samples/learning-more/logging-scribe/README')
-rw-r--r--sca-java-2.x/trunk/samples/learning-more/logging-scribe/README51
1 files changed, 51 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/samples/learning-more/logging-scribe/README b/sca-java-2.x/trunk/samples/learning-more/logging-scribe/README
new file mode 100644
index 0000000000..92f339ead5
--- /dev/null
+++ b/sca-java-2.x/trunk/samples/learning-more/logging-scribe/README
@@ -0,0 +1,51 @@
+This Tuscany sample shows how to implement and use a simple Logger component
+that logs string messages to a Scribe logging server.
+
+Scribe is an Open Source server for aggregating streaming log data. It is
+designed to scale to a very large number of nodes and be robust to network
+and node failures.
+
+See the Scribe Wiki [1] for more information on Scribe.
+
+Getting the required Apache Thrift library
+==========================================
+This sample uses Apache Thrift's libthrift.jar to communicate with Scribe
+servers. Libthrift is not yet available in a Maven repository, so before
+building the sample with Maven, you need to download libthrift [2] and
+install it in your local Maven repository like this:
+
+mvn install:install-file -DgroupId=org.apache.thrift -DartifactId=libthrift \
+-Dversion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=libthrift-r917130.jar
+
+Starting a Scribe server
+========================
+Before running the LoggingTest sample test program, you need to start a Scribe
+server for the sample program to connect to.
+
+Steps to start a Scribe server are described in the Scribe examples README [3].
+A simple Scribe server configuration can be found in the Scribe examples [4].
+
+LoggingTest will try to connect to a Scribe server at localhost:1463. To use
+a Scribe server at a different host or port, configure the host and port
+properties in scribe.composite to match your server.
+
+Running the LoggingTest sample test program
+===========================================
+
+To run the LoggingTest sample test program, do this:
+mvn -Dtest=LoggingTest test
+
+Checking the Scribe log output
+==============================
+After running LoggingTest, you should find the logged string "Hello There" in
+file sample/sample_current under your Scribe log store directory.
+
+If you've used the example1.conf Scribe configuration from the Scribe examples
+[4], you should find your log message in /tmp/scribetest/sample/sample_current.
+
+
+[1] http://wiki.github.com/facebook/scribe/
+[2] http://svn.apache.org/repos/asf/cassandra/trunk/lib/libthrift-r917130.jar
+[3] http://github.com/facebook/scribe/blob/master/examples/README
+[4] http://github.com/facebook/scribe/blob/master/examples/example1.conf
+