From f0e080e9103bfd867826ecac22f39338d5f3e829 Mon Sep 17 00:00:00 2001
From: David Robillard
Date: Thu, 5 Apr 2012 21:22:22 +0000
Subject: Twiddle log extension class hierarchy a bit, and all log:Trace level.
Use log extension in eg-sample if available.
---
lv2/lv2plug.in/ns/ext/log/log.h | 20 ++++++++++++--------
lv2/lv2plug.in/ns/ext/log/log.ttl | 29 +++++++++++++++++++++--------
2 files changed, 33 insertions(+), 16 deletions(-)
(limited to 'lv2')
diff --git a/lv2/lv2plug.in/ns/ext/log/log.h b/lv2/lv2plug.in/ns/ext/log/log.h
index 4682295..3c2ec40 100644
--- a/lv2/lv2plug.in/ns/ext/log/log.h
+++ b/lv2/lv2plug.in/ns/ext/log/log.h
@@ -25,10 +25,12 @@
#define LV2_LOG_URI "http://lv2plug.in/ns/ext/log"
#define LV2_LOG_PREFIX LV2_LOG_URI "#"
-#define LV2_LOG__Error LV2_LOG_PREFIX "Error"
-#define LV2_LOG__Info LV2_LOG_PREFIX "Info"
-#define LV2_LOG__Warn LV2_LOG_PREFIX "Warn"
-#define LV2_LOG__log LV2_LOG_PREFIX "log"
+#define LV2_LOG__Entry LV2_LOG_PREFIX "Entry"
+#define LV2_LOG__Error LV2_LOG_PREFIX "Error"
+#define LV2_LOG__Note LV2_LOG_PREFIX "Note"
+#define LV2_LOG__Trace LV2_LOG_PREFIX "Trace"
+#define LV2_LOG__Warning LV2_LOG_PREFIX "Warning"
+#define LV2_LOG__log LV2_LOG_PREFIX "log"
#include
@@ -67,11 +69,12 @@ typedef struct _LV2_Log {
The API of this function matches that of the standard C printf
function, except for the addition of the first two parameters. This
- function may be called from any non-realtime context.
+ function may be called from any non-realtime context, or from any
+ context if @p type is @ref LV2_LOG__Trace.
*/
LV2_LOG_FUNC(3, 4)
int (*printf)(LV2_Log_Handle handle,
- LV2_URID level,
+ LV2_URID type,
const char* fmt, ...);
/**
@@ -79,11 +82,12 @@ typedef struct _LV2_Log {
The API of this function matches that of the standard C vprintf
function, except for the addition of the first two parameters. This
- function may be called from any non-realtime context.
+ function may be called from any non-realtime context, or from any
+ context if @p type is @ref LV2_LOG__Trace.
*/
LV2_LOG_FUNC(3, 0)
int (*vprintf)(LV2_Log_Handle handle,
- LV2_URID level,
+ LV2_URID type,
const char* fmt,
va_list ap);
} LV2_Log_Log;
diff --git a/lv2/lv2plug.in/ns/ext/log/log.ttl b/lv2/lv2plug.in/ns/ext/log/log.ttl
index a8d9caf..a3c3724 100644
--- a/lv2/lv2plug.in/ns/ext/log/log.ttl
+++ b/lv2/lv2plug.in/ns/ext/log/log.ttl
@@ -39,31 +39,44 @@ levels is unlimited, but implementations SHOULD use the levels defined in this
extension unless they have a special reason to do otherwise.
""" .
-log:Level
+log:Entry
a rdfs:Class ;
lv2:documentation """
-A log level. Subclasses of this class can be passed to LV2_Log_Log methods
+
A log entry. Subclasses of this class can be passed to LV2_Log_Log methods
to describe the nature of the log message.
""" .
log:Error
a rdfs:Class ;
- rdfs:subClassOf log:Level ;
+ rdfs:subClassOf log:Entry ;
rdfs:comment "An error" .
-log:Info
+log:Note
a rdfs:Class ;
- rdfs:subClassOf log:Level ;
+ rdfs:subClassOf log:Entry ;
rdfs:comment "An informative message" .
-log:Warn
+log:Warning
a rdfs:Class ;
- rdfs:subClassOf log:Level ;
+ rdfs:subClassOf log:Entry ;
rdfs:comment "A warning" .
+log:Trace
+ a rdfs:Class ;
+ rdfs:subClassOf log:Entry ;
+ lv2:documentation """
+A debugging trace. These entries should not be displayed during normal
+operation, but the host may implement an option to display them for debugging
+purposes.
+
+This entry type is special in that it may be written to in a real-time
+thread. It is assumed that if debug tracing is enabled, real-time
+considerations are not a concern.
+""" .
+
log:log
a lv2:Feature ;
lv2:documentation """
A feature which plugins may use to log messages. To support this feature,
the host must pass an LV2_Feature to LV2_Descriptor::instantiate() with URI
-LV2_LOG_LOG_URI and data pointed to an instance of LV2_Log_Log.
+LV2_LOG__log and data pointed to an instance of LV2_Log_Log.
""" .
--
cgit v1.2.1