From e69647e23e0eb95f62afa2c09459c77d98c2853b Mon Sep 17 00:00:00 2001
From: Peter Andersson
- Importance >= (100-VerbosityLevel)-
This also means that verbosity level 0 effectively turns all logging off
- (except from printouts made by
The constant
The general verbosity level is not associated with any particular category. This level sets the threshold for the standard I/O printouts, @@ -1003,17 +1005,17 @@
Examples:
Some printouts during test case execution:
-+-io:format("1. Standard IO, importance = ~w~n", [?STD_IMPORTANCE]), ct:log("2. Uncategorized, importance = ~w", [?STD_IMPORTANCE]), - ct:log(info, "3. Categorized info, importance = ~w", [?STD_IMPORTANCE]]), + ct:log(info, "3. Categorized info, importance = ~w", [?STD_IMPORTANCE]), ct:log(info, ?LOW_IMPORTANCE, "4. Categorized info, importance = ~w", [?LOW_IMPORTANCE]), - ct:log(error, "5. Categorized error, importance = ~w", [?HI_IMPORTANCE]), - ct:log(error, ?HI_IMPORTANCE, "6. Categorized error, importance = ~w", [?MAX_IMPORTANCE]),+ ct:log(error, ?HI_IMPORTANCE, "5. Categorized error, importance = ~w", [?HI_IMPORTANCE]), + ct:log(error, ?MAX_IMPORTANCE, "6. Categorized error, importance = ~w", [?MAX_IMPORTANCE]),
If starting the test without specifying any verbosity levels as follows:
+If starting the test with a general verbosity level of 50 (
- $ ct_run ...+ $ ct_run -verbosity 50
the following is printed:
1. Standard IO, importance = 50 @@ -1031,10 +1033,22 @@ 4. Categorized info, importance = 25 6. Categorized error, importance = 99+
Note that the category argument is not required in order to only specify the + importance of a printout. Example:
+++ct:pal(?LOW_IMPORTANCE, "Info report: ~p", [Info])
Or perhaps in combination with constants:
++-define(INFO, ?LOW_IMPORTANCE). +-define(ERROR, ?HI_IMPORTANCE). + +ct:log(?INFO, "Info report: ~p", [Info]) +ct:pal(?ERROR, "Error report: ~p", [Error])+
The functions
The arguments