Author: tfischer Date: Thu Feb 14 08:28:02 2013 New Revision: 1446065 URL: http://svn.apache.org/r1446065 Log: TORQUE-265 document logging in the generator
Added: db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/codegen-reference/logging.xml Modified: db/torque/torque4/trunk/torque-site/src/site/site.xml Modified: db/torque/torque4/trunk/torque-site/src/site/site.xml URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/site.xml?rev=1446065&r1=1446064&r2=1446065&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-site/src/site/site.xml (original) +++ db/torque/torque4/trunk/torque-site/src/site/site.xml Thu Feb 14 08:28:02 2013 @@ -97,6 +97,7 @@ <item name="Configuration" href="/documentation/codegen-reference/configuration.html"/> <item name="Extending" href="/documentation/codegen-reference/extending.html"/> <item name="Target Modes" href="/documentation/codegen-reference/existing-target-modes.html"/> + <item name="Logging" href="/documentation/codegen-reference/logging.html"/> <item name="Generator Internals" href="/documentation/codegen-reference/generator-internals/index.html" collapse="true"> <item name="Outlet Types" href="/documentation/codegen-reference/generator-internals/outletTypes.html"/> </item> Added: db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/codegen-reference/logging.xml URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/codegen-reference/logging.xml?rev=1446065&view=auto ============================================================================== --- db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/codegen-reference/logging.xml (added) +++ db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/codegen-reference/logging.xml Thu Feb 14 08:28:02 2013 @@ -0,0 +1,68 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> + +<document> + + <properties> + <title>Logging</title> + </properties> + + <body> + <section name="Logging in the Torque generator"> + <p> + The Torque generator uses logging to visualize the work it is doing + at the moment. It commons-logging as logging abstraction, so in principle, + it is logging-framework agnostic. + </p> + <p> + However, the loglevel of the Torque generator can be changed by its + configuration. This is because it is typically a hassle to configure + the logging framework in the build tools where the torque generator + is normally running. The ability to set the loglevel is not provided by + commons-logging, therefore an adapter (an implementation of + <code>org.apache.torque.generator.configuration.controller.LoggingAdapter</code>) + is used. + </p> + <p> + Natively, the Torque generator contains two implementations: + </p> + <ul> + <li> + A log4j adapter which reads and sets the current loglevel + by reading and changing the level of log4j's root logger + (<code>org.apache.torque.generator.configuration.controller.Log4jLoggingAdapter</code>). + </li> + <li> + A dummy adapter which implements the LoggingAdapter interface + but cannot read or change a log level + (<code>org.apache.torque.generator.configuration.controller.DummyLoggingAdapter</code>). + </li> + </ul> + <p> + The adapter can be changed at runtime by calling the static method + <code>setLoggingAdapter(LoggingAdapter)</code> of the class + <code>org.apache.torque.generator.configuration.controller.Loglevel</code>. + By default, the <code>Log4jLoggingAdapter</code> is used. + </p> + </section> + + + </body> +</document> \ No newline at end of file --------------------------------------------------------------------- To unsubscribe, e-mail: torque-dev-unsubscr...@db.apache.org For additional commands, e-mail: torque-dev-h...@db.apache.org