2
0
Эх сурвалжийг харах

Update logging.adoc

Fixed broken newline.
Fixed broken list continuation by bringing the java examples into the list.
mitm001 8 жил өмнө
parent
commit
fe14bd16c2

+ 5 - 1
src/docs/asciidoc/jme3/advanced/logging.adoc

@@ -27,15 +27,18 @@ Instead of `println()`, use the standard Java logger from `java.util.logging`. I
 To print comments like a pro, you use the following logger syntax.
 To print comments like a pro, you use the following logger syntax.
 
 
 .  Declare the logger object once per file. In the following code, replace `HelloWorld` by the name of the class where you are using this line.
 .  Declare the logger object once per file. In the following code, replace `HelloWorld` by the name of the class where you are using this line.
++
 [source,java]
 [source,java]
 ----
 ----
 private static final Logger logger = Logger.getLogger(HelloWorld.class.getName());
 private static final Logger logger = Logger.getLogger(HelloWorld.class.getName());
 ----
 ----
 
 
-.  Declare the info that you want to include in the message. The variables (here `a, b, c`) can be any printable Java object. +Example: `Vector3f a = cam.getLocation();` 
+.  Declare the info that you want to include in the message. The variables (here `a, b, c`) can be any printable Java object. +
+Example: `Vector3f a = cam.getLocation();` 
 .  Put the variables in a new `Object` array. Refer to the variables as `{0},{1},{2}` etc in the message string. Variables are numbered in the order you put them into the `Object` array. 
 .  Put the variables in a new `Object` array. Refer to the variables as `{0},{1},{2}` etc in the message string. Variables are numbered in the order you put them into the `Object` array. 
 .  Add the logger line and specify the log level:
 .  Add the logger line and specify the log level:
 **  Usecase 1: During debugging, a developer uses a warning to remind himself of a bug:
 **  Usecase 1: During debugging, a developer uses a warning to remind himself of a bug:
++
 [source,java]
 [source,java]
 ----
 ----
 logger.log(Level.WARNING, "why is {0} set to {1} again?!", 
 logger.log(Level.WARNING, "why is {0} set to {1} again?!", 
@@ -43,6 +46,7 @@ logger.log(Level.WARNING, "why is {0} set to {1} again?!",
 ----
 ----
 
 
 **  Usecase 2: For the release, you inform the customer of a problem and how to solve it. 
 **  Usecase 2: For the release, you inform the customer of a problem and how to solve it. 
++
 [source,java]
 [source,java]
 ----
 ----
 logger.log(Level.SEVERE, "MyGame error: {0} must not be {1} after {2}! Adjust flux generator settings.", 
 logger.log(Level.SEVERE, "MyGame error: {0} must not be {1} after {2}! Adjust flux generator settings.",