1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-09-01 18:54:39 +02:00

never used

This commit is contained in:
Justin Lin
2019-06-12 08:58:32 +08:00
parent 8c4d2b5333
commit bf0601eaef
3 changed files with 0 additions and 117 deletions

View File

@@ -1,46 +0,0 @@
# log
A log module which supports simple level configurations and color titles.
## Parameters
- `$log_level` : The accepted values are `"OFF"` (-1), `"INFO"` (20),
`"WARNING"` (30), `"ERROR"` (40) or positive integers. The default value is `"INFO"`.
- `level` : The accepted values are `"OFF"` (-1), `"INFO"` (20),
`"WARNING"` (30), `"ERROR"` (40) or positive integers. If the value is greater or equal to `$log_level`, the `echo` message will display in the console.
- `level_color` : Controls the color of level title. It accepts the same values as the CSS `color` property.
## Examples
include <log.scad>;
log()
echo(" INFO message");
log("WARNING")
echo(" WARNING message");
log("ERROR") {
echo(" ERROR message 1");
echo(" ERROR message 2");
}
![log](images/lib-log-1.JPG)
include <log.scad>;
$log_level = "WARNING";
log()
echo(" INFO message");
log("WARNING", "purple")
echo(" WARNING message");
log("ERROR", "rgb(255, 100, 100)") {
echo(" ERROR message 1");
echo(" ERROR message 2");
}
![log](images/lib-log-2.JPG)