aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--README.md2
-rw-r--r--askama_derive/src/lib.rs4
2 files changed, 4 insertions, 2 deletions
diff --git a/README.md b/README.md
index cc0b49f..8e51642 100644
--- a/README.md
+++ b/README.md
@@ -142,6 +142,8 @@ The `print` key can take one of four values:
* `code` (print the generated code)
* `all` (print both parse tree and code)
+The resulting output will be printed to `stderr` during the compilation process.
+
The parse tree looks like this for the example template:
```
diff --git a/askama_derive/src/lib.rs b/askama_derive/src/lib.rs
index 69cd686..f578d80 100644
--- a/askama_derive/src/lib.rs
+++ b/askama_derive/src/lib.rs
@@ -64,12 +64,12 @@ fn build_template(ast: &syn::DeriveInput) -> String {
};
if input.print == Print::Ast || input.print == Print::All {
- println!("{:?}", parsed[&input.path]);
+ eprintln!("{:?}", parsed[&input.path]);
}
let code = generator::generate(&input, &contexts, &heritage);
if input.print == Print::Code || input.print == Print::All {
- println!("{}", code);
+ eprintln!("{}", code);
}
code
}