Index: std/neko/Web.hx
===================================================================
RCS file: /cvsroot/haxe/std/neko/Web.hx,v
retrieving revision 1.23
diff -u -r1.23 Web.hx
--- std/neko/Web.hx	21 May 2008 10:30:27 -0000	1.23
+++ std/neko/Web.hx	9 Jul 2008 13:12:37 -0000
@@ -288,6 +288,13 @@
 		return new String(_get_http_method());
 	}
 
+	/** 
+		Dump message to the standard Apache error log
+	**/
+	public static function writeLog(message: String, level: Int): Void {
+		_log_rerror(untyped message.__s, level);
+	}
+
 	public static var isModNeko(default,null) : Bool;
 
 	static var _set_main : Dynamic;
@@ -308,6 +315,7 @@
 	static var _flush : Dynamic;
 	static var _get_client_headers : Dynamic;
 	static var _get_http_method : Dynamic;
+	static var _log_rerror : Dynamic;
 	static var _base_decode = Lib.load("std","base_decode",2);
 
 	static function __init__() {
@@ -331,6 +339,7 @@
 			_set_cookie = Lib.load(lib,"set_cookie",2);
 			_get_cwd = Lib.load(lib,"cgi_get_cwd",0);
 			_get_http_method = Lib.loadLazy(lib,"get_http_method",0);
+			_log_rerror = Lib.loadLazy(lib, "log_rerror", 2);
 			_parse_multipart = try Lib.load(lib,"parse_multipart_data",2) catch( e : Dynamic ) function(a,b) { throw "Please upgrade Neko"; };
 			_flush = try Lib.load(lib,"cgi_flush",0) catch( e : Dynamic ) function() { throw "Please upgrade Neko"; };
 			_get_client_headers = try Lib.load(lib,"get_client_headers",0) catch( e : Dynamic ) function() { throw "Please upgrade Neko"; };
@@ -367,6 +376,7 @@
 			_set_cookie = function(k,v) { };
 			_get_cwd = Lib.load("std","get_cwd",0);
 			_get_http_method = function() return untyped "GET".__s;
+			_log_rerror = function (m, l) { neko.io.File.stderr().write(m); }
 			_parse_multipart = function(a,b) { throw "Not supported"; };
 			_flush = function() { };
 		}
