So I want to physically get rid of debugging code before deploying it to appengine. What I m doing right now is a simple check:
settings.py:
DEBUG = os.environ[ HTTP_HOST ] == localhost
from settings import DEBUG
if DEBUG:
#ensure I haven t screwed smth up during refactoring
But this check will be consuming CPU cycles during each call, right? In Java, there s a pattern that would strip debugging code at compile time:
public static final boolean DEBUG = true; // change to false before going production
if(DEBUG){
//debug logging
}
如果我用像<代码>#%STRIP_ME%<<>>/code>那样的缩略语,然后用习惯文字对密码加以封 the,那么在沙尔还是在沙尔实现同样效果方面是否有干净的方法?