From d34ff0c00863324f36c9cddf58fd403a8e5b9654 Mon Sep 17 00:00:00 2001 From: jensp Date: Fri, 30 Jan 2015 13:17:42 +0000 Subject: [PATCH] Made log messages from Foundry configurable. git-svn-id: https://svn.libreccm.org/ccm/trunk@3109 8810af33-2d31-482b-a856-94f89814c4df --- .../web/themes/foundry-base/conf/global.xml | 2 + ccm-core/web/themes/foundry/conf/global.xml | 2 + .../foundry/foundry/lib/bebop/table.xsl | 33 +- .../foundry/foundry/lib/template-parser.xsl | 32 +- .../lib/template-tags/content-items.xsl | 30 +- .../lib/template-tags/foundry-doc-tags.xsl | 4 - .../foundry/lib/template-tags/navigation.xsl | 56 +--- .../web/themes/foundry/foundry/lib/utils.xsl | 312 +++++++++--------- ccm-core/web/themes/foundry/foundry/main.xsl | 33 +- 9 files changed, 249 insertions(+), 255 deletions(-) diff --git a/ccm-core/web/themes/foundry-base/conf/global.xml b/ccm-core/web/themes/foundry-base/conf/global.xml index ec02b4c57..25ecdefd5 100644 --- a/ccm-core/web/themes/foundry-base/conf/global.xml +++ b/ccm-core/web/themes/foundry-base/conf/global.xml @@ -13,6 +13,8 @@ --> + warn + \ No newline at end of file diff --git a/ccm-core/web/themes/foundry/conf/global.xml b/ccm-core/web/themes/foundry/conf/global.xml index 0e37be814..a60ecc9e5 100644 --- a/ccm-core/web/themes/foundry/conf/global.xml +++ b/ccm-core/web/themes/foundry/conf/global.xml @@ -13,6 +13,8 @@ --> + warn + \ No newline at end of file diff --git a/ccm-core/web/themes/foundry/foundry/lib/bebop/table.xsl b/ccm-core/web/themes/foundry/foundry/lib/bebop/table.xsl index 01451603d..fb7eb12a1 100644 --- a/ccm-core/web/themes/foundry/foundry/lib/bebop/table.xsl +++ b/ccm-core/web/themes/foundry/foundry/lib/bebop/table.xsl @@ -26,14 +26,13 @@ Processing bebop tables --> - + - diff --git a/ccm-core/web/themes/foundry/foundry/lib/template-tags/navigation.xsl b/ccm-core/web/themes/foundry/foundry/lib/template-tags/navigation.xsl index 2501ee783..d2d406d1e 100644 --- a/ccm-core/web/themes/foundry/foundry/lib/template-tags/navigation.xsl +++ b/ccm-core/web/themes/foundry/foundry/lib/template-tags/navigation.xsl @@ -294,51 +294,17 @@ - - - - - - - - - - - - - - - - - - - - - - - - + + + + diff --git a/ccm-core/web/themes/foundry/foundry/lib/utils.xsl b/ccm-core/web/themes/foundry/foundry/lib/utils.xsl index eeaf87178..74562afc7 100644 --- a/ccm-core/web/themes/foundry/foundry/lib/utils.xsl +++ b/ccm-core/web/themes/foundry/foundry/lib/utils.xsl @@ -39,7 +39,7 @@ Utility functions

- Utility functions. + This file provides several utility functions and templates.

@@ -180,84 +180,85 @@ - + - - -

- Variant of gen-path with an additional origin - parameter. This parameter can have three values: - If set to true the file is loaded from the - foundry directory. -

-
-
empty string ('')
-
- The path points to a resource in the theme directory. The return value is the - concatenation of the theme-prefix, a slash and the path provided as first - parameter. In XPath Syntax: concat($theme-prefix, '/', $path. -
-
master
-
- If the theme mode (which is set in conf/global.xml) is set to - master the result is the same as for the empty string. If the - the theme mode is set to child the generated path points to - the parent/master theme. More exactly the result is the concatenation of the - context-prefix environment variable, the string /themes/, the - name of the master theme (set in conf/global.xml, - usally foundry), a slash the the path provided as first parameter. - Or in XPath syntax: - concat($content-prefix, '/themes/', $master-theme, '/', $path.). -
-
internal
-
- The path points to an internal resource which is provided by Foundry. If the - theme mode is master the generated path is the concatenation of - the theme prefix, the string /foundry/ and the path provided as - first parameter (XPath: concat($theme-prefix, '/foundry/', $path). - If the theme mode is child the generated path - is the concatenation of the context prefix, the string - /themes/foundry/foundry/ and the path provided as first parameter - (XPath: concat($context-prefix, '/themes/foundry/foundry/', $path)). -
-
-
-
- - - + + +

+ Variant of gen-path with an additional origin + parameter. This parameter can have three values: + If set to true the file is loaded from the + foundry directory. +

+
+
empty string ('')
+
+ The path points to a resource in the theme directory. The return value is the + concatenation of the theme-prefix, a slash and the path provided as first + parameter. In XPath Syntax: concat($theme-prefix, '/', $path. +
+
master
+
+ If the theme mode (which is set in conf/global.xml) is set to + master the result is the same as for the empty string. If the + the theme mode is set to child the generated path points to + the parent/master theme. More exactly the result is the concatenation of the + context-prefix environment variable, the string /themes/, the + name of the master theme (set in conf/global.xml, + usally foundry), a slash the the path provided as first parameter. + Or in XPath syntax: + concat($content-prefix, '/themes/', $master-theme, '/', $path.). +
+
internal
+
+ The path points to an internal resource which is provided by Foundry. If the + theme mode is master the generated path is the concatenation of + the theme prefix, the string /foundry/ and the path provided as + first parameter (XPath: concat($theme-prefix, '/foundry/', $path). + If the theme mode is child the generated path + is the concatenation of the context prefix, the string + /themes/foundry/foundry/ and the path provided as first parameter + (XPath: concat($context-prefix, '/themes/foundry/foundry/', $path)). +
+
+
+
+ + + - - - - - - - - - + + + + + + + - - - - - - + + + + - - - - - - +
+ + + +
+ - + + - The level of the message, indicating its severity @@ -277,13 +278,18 @@

- A helper function used by the other message functions like - foundry:message-warn. Concatenates the message level with the message. + A helper template used by the other message templates like + foundry:message-warn. Outputs a message (for example in the + application servers log using xsl:message. + Concatenates the message level with the message.

- This function should not be used directly. Use the other message functions instead. + This template should not be used directly. Use the other message templates instead.

+ + #foundry-message-debug + #foundry-message-info @@ -294,14 +300,29 @@ #foundry-message-error
- - + + - - + + + + + + + + - + + + + + + + + + +

- Helper function to generate an info message. This function be used together with - <xsl:message> to output a message in the CCM log. Example: + Helper function to generate an info message. This template generates a + <xsl:message> element which causes the XSL processor to output + a message in the application server log. The message will on shown if the log level + in the global configuration is set to info or error.

-
-                ...
-                <xsl:message>
-                    <xsl:message select="foundry:message-info('Hello from Foundry')" />
-                </xsl:message>
-            
#foundry-message-warn @@ -334,11 +351,14 @@ #foundry-message-error
- + - - + + + + + @@ -374,11 +394,14 @@ #foundry-message-error - + - - + + + + + @@ -415,12 +438,40 @@ #foundry-message-warn - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -604,16 +655,23 @@
- - - - - - - - - - + + + + + + + + + + + + @@ -625,10 +683,6 @@ - - - - @@ -707,40 +761,19 @@ select="if ($internal) then 'internal' else ''"/> - - - - - - - - - + - - - - - - - - - @@ -759,9 +792,6 @@ - - - @@ -790,15 +820,9 @@ - - debug mode active - - - debug mode NOT active - @@ -835,7 +859,7 @@ - + @@ -918,13 +942,6 @@ - - - - - - - @@ -1120,7 +1137,6 @@ - truncate length - limit diff --git a/ccm-core/web/themes/foundry/foundry/main.xsl b/ccm-core/web/themes/foundry/foundry/main.xsl index aa3f86f88..a16d674b0 100644 --- a/ccm-core/web/themes/foundry/foundry/main.xsl +++ b/ccm-core/web/themes/foundry/foundry/main.xsl @@ -45,9 +45,10 @@ select="foundry:get-app-layout-template(foundry:get-current-application(), foundry:get-current-application-class())"/> - - - + + + @@ -95,9 +96,11 @@ - - - + + + @@ -123,12 +126,18 @@ - - - - - - + + + + + +