Initial commit
[yaffs-website] / node_modules / node-sass / src / libsass / docs / trace.md
1 ## This is proposed interface in https://github.com/sass/libsass/pull/1288
2
3 Additional debugging macros with low overhead are available, `TRACE()` and `TRACEINST()`.
4
5 Both macros simulate a string stream, so they can be used like this:
6
7     TRACE() << "Reached.";
8
9 produces:
10
11     [LibSass] parse_value parser.cpp:1384 Reached.
12
13 `TRACE()`
14    logs function name, source filename, source file name to the standard error and the attached
15    stream to the standard error.
16
17 `TRACEINST(obj)`
18    logs object instance address, function name, source filename, source file name to the standard error and the attached stream to the standard error, for example:
19
20     TRACEINST(this) << "String_Constant created " << this;
21
22 produces:
23
24     [LibSass] 0x8031ba980:String_Constant ./ast.hpp:1371 String_Constant created (0,"auto")
25
26 The macros generate output only of `LibSass_TRACE` is set in the environment.