View previous topic :: View next topic |
Author |
Message |
atraeyu
Joined: 12 Dec 2007 Posts: 165
|
Posted: Fri Sep 26, 2014 2:56 pm Post subject: Verbose output when using #read from an alias |
|
|
I have some wrappers that break up my codebase into modules. I issue #read commands from an alias.
Even with #config verbose enabled, I never see if anything fails to load. If I hardcode the read commands with: #line verbose #read <file> then I always see the verbose information - though I really only want it when I'm debugging.
Because I can't tie directly into the underlying code (for example, through an API that returns the list of loaded classes), I can't actually verify that they were loaded with my own code.
In any case, it would be awesome if #config verbose produced output when #read commands were issued from an alias. |
|
Back to top |
|
 |
Scandum Site Admin
Joined: 03 Dec 2004 Posts: 3842
|
Posted: Fri Sep 26, 2014 5:42 pm Post subject: |
|
|
People will complain if I make it verbose.
If #line verbose works that's the way to go. |
|
Back to top |
|
 |
atraeyu
Joined: 12 Dec 2007 Posts: 165
|
Posted: Sat Sep 27, 2014 10:05 am Post subject: |
|
|
KK.
May have a solution that works for me, still testing:
Code: | #var READ_VERBOSE 1;
#alias read {
#if { "$READ_VERBOSE" != "1" } {
msg {DEBUG} {Reading %1.};
#read %1;
};
#else {
msg {DEBUG} {Reading %1 with verbose output.};
#line verbose #read %1;
};
} |
|
|
Back to top |
|
 |
|