Question: I have this code.
Only the first drawLine gets drawn and the rest 2 are not. Can anyone explain why the other two drawlines do not work in the present case?
They work if I replace "factor" with "1/2" in the drawLine() statements.
Thanks

public class RenderView extends View {

```
Paint paint;
private float factor = 1/2;

public RenderView(Context context) {
    // TODO Auto-generated constructor stub
    super(context);
    paint = new Paint(Paint.ANTI_ALIAS_FLAG);
}

@Override
protected void onDraw(Canvas canvas) {

    int screenWidth = canvas.getWidth();
    int screenHeight = canvas.getHeight();

    paint.setColor(Color.RED);

    canvas.drawLine(0, 0, screenWidth, screenHeight, paint);

    canvas.drawLine(factor*screenWidth, 0, factor*screenWidth, screenHeight, paint);

    canvas.drawLine(0, factor*screenHeight, screenWidth, factor*screenHeight, paint);

    invalidate();       
}

```

}

Answer: 
The options seem to be

1. Sending to /dev/null on \*nix or C:/nul on Windows ([see here](http://www.apachelounge.com/viewtopic.php?t=3184))
2. Removing the base logging directives and duplicating them in each vhost (so there is no logging on for vhosts by default)

Seems like there should be some better way to do this, but that's what I've found.
I achieve this by making the logging dependent on a non-existing environment variable. So in the `VirtualHost` you can have:

```
CustomLog /var/log/httpd/my_access_log combined env=DISABLED

```

and so long as there is no environment variable called `DISABLED` then you'll get no logs.

I actually arrived here looking for a neater solution but this works without having to change the global `httpd.conf`.

Edit: removed reference to `.htaccess` because `CustomLog` only applies in the global config or in the virtual host config as pointed out by @Basj