[asterisk-scf-commits] asterisk-scf/integration/slice.git branch "master" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Mon Oct 4 17:13:42 CDT 2010
branch "master" has been updated
via 0c629393e2f05dc0ed43bcc6305880949df36289 (commit)
from 36a57a423c849ff5688d8c4f3569bf3639feed36 (commit)
Summary of changes:
System/CMakeLists.txt | 3 +
System/Logger/CMakeLists.txt | 2 +
System/Logger/LoggerIf.ice | 114 ++++++++++++++++++++++++++++++++++++++++++
3 files changed, 119 insertions(+), 0 deletions(-)
create mode 100644 System/Logger/CMakeLists.txt
create mode 100644 System/Logger/LoggerIf.ice
- Log -----------------------------------------------------------------
commit 0c629393e2f05dc0ed43bcc6305880949df36289
Author: David M. Lee <dlee at digium.com>
Date: Mon Oct 4 17:05:35 2010 -0500
Adding Logger slice.
diff --git a/System/CMakeLists.txt b/System/CMakeLists.txt
index 526c3fe..850f114 100644
--- a/System/CMakeLists.txt
+++ b/System/CMakeLists.txt
@@ -3,3 +3,6 @@ add_subdirectory(Component)
# Slice definitions for Time services functionality
add_subdirectory(Time)
+
+# Slice definitions for the Logger service
+add_subdirectory(Logger)
diff --git a/System/Logger/CMakeLists.txt b/System/Logger/CMakeLists.txt
new file mode 100644
index 0000000..8139a8b
--- /dev/null
+++ b/System/Logger/CMakeLists.txt
@@ -0,0 +1,2 @@
+# Compile Time API
+hydra_compile_slice(LoggerIf.ice lib "Logger service API" System)
diff --git a/System/Logger/LoggerIf.ice b/System/Logger/LoggerIf.ice
new file mode 100644
index 0000000..2e38815
--- /dev/null
+++ b/System/Logger/LoggerIf.ice
@@ -0,0 +1,114 @@
+/*
+ * Asterisk Scalable Communications Framework
+ *
+ * Copyright (C) 2010 -- Digium, Inc.
+ *
+ * All rights reserved.
+ */
+
+#pragma once
+
+module AsteriskSCF
+{
+module System
+{
+module Logging
+{
+
+/**
+ * Category for locating the LoggingServer in the ServiceLocator.
+ */
+const string LoggingServerCategory = "LoggingServer";
+/**
+ * Guid for listenting to LoggingServer registration events from the
+ * ServiceLocator.
+ */
+const string LoggingServerGuid = "LoggingServer";
+/**
+ * Topic name for configuration updates.
+ */
+const string ServerConfigurationTopic = "AsteriskSCF.System.Logging.config";
+
+/**
+ * Warning levels, inspired by syslog.
+ */
+enum Level
+{
+ /** debug-level messages */
+ Debug,
+ /** informational messages */
+ Info,
+ /** normal but significant condition */
+ Notice,
+ /** warning conditions */
+ Warning,
+ /** error conditions */
+ Error,
+ /** critical conditions */
+ Critical,
+ /** action must be taken immediately */
+ Alert,
+ /** system is unusable */
+ Emergency,
+ /** phony level; only to be used in setting log levels */
+ Off
+};
+
+sequence<string> StringSeq;
+
+/**
+ * The configuration for a particular name.
+ */
+struct SourceConfiguration
+{
+ /**
+ * A name identifies the source component of a log message. It can
+ * be represented as a dot-notation from the source path.
+ * i.e. if the path name is ["AsteriskSCF", "Core", "Routing"], then the
+ * dot-notation would be "AsteriskSCF.Core.Routing".
+ */
+ string name;
+ Level logLevel;
+};
+sequence<SourceConfiguration> SourceConfigurationSeq;
+
+/**
+ * Configuration for the LoggingServer.
+ */
+struct Configuration
+{
+ SourceConfigurationSeq sourceSettings;
+};
+
+/**
+ * Server-side logging interface.
+ */
+interface LoggingServer
+{
+ /**
+ * Log a message from a given source, at a given level. Note that
+ * server configuration may filter this message at the destination.
+ * log may be a #define, hence the name logm.
+ */
+ ["cpp:const"]
+ idempotent void logs(string name, Level logLevel, string message);
+
+ /**
+ * Returns the current configuration for this server.
+ */
+ ["cpp:const"]
+ idempotent Configuration getConfiguration();
+};
+
+
+/**
+ * Topic interface for notification of Configuration changes.
+ */
+interface ServerConfigurationListener
+{
+ void configured(Configuration logConfiguration);
+};
+
+}; // Logging
+}; // System
+}; // AsteriskSCF
-----------------------------------------------------------------------
--
asterisk-scf/integration/slice.git
More information about the asterisk-scf-commits
mailing list