comparison base/src/java/lang/util.d @ 44:ed96ea2a2764

First swt win snippets are buiding with d2+phobos
author Frank Benoit <benoit@tionex.de>
date Wed, 25 Mar 2009 18:31:01 +0100
parents 0ecb2b338560
children 8939451abc39
comparison
equal deleted inserted replaced
43:b98647bc0aef 44:ed96ea2a2764
12 12
13 alias tango.stdc.stdlib.exit exit; 13 alias tango.stdc.stdlib.exit exit;
14 } else { // Phobos 14 } else { // Phobos
15 static import core.exception; 15 static import core.exception;
16 static import std.c.stdlib; 16 static import std.c.stdlib;
17 static import std.stdio;
17 alias std.c.stdlib.exit exit; 18 alias std.c.stdlib.exit exit;
18 } 19 }
19 20
20 version(Tango){ 21 version(Tango){
21 } else { // Phobos 22 } else { // Phobos
75 } else { // Phobos 76 } else { // Phobos
76 class DwtLogger : IDwtLogger { 77 class DwtLogger : IDwtLogger {
77 private this( String name ){ 78 private this( String name ){
78 } 79 }
79 void trace( String file, ulong line, String fmt, ... ){ 80 void trace( String file, ulong line, String fmt, ... ){
81 std.stdio.writefln( "TRC %s %d: %s", file, line, fmt );
80 } 82 }
81 void info( String file, ulong line, String fmt, ... ){ 83 void info( String file, ulong line, String fmt, ... ){
84 std.stdio.writefln( "INF %s %d: %s", file, line, fmt );
82 } 85 }
83 void warn( String file, ulong line, String fmt, ... ){ 86 void warn( String file, ulong line, String fmt, ... ){
87 std.stdio.writefln( "WRN %s %d: %s", file, line, fmt );
84 } 88 }
85 void error( String file, ulong line, String fmt, ... ){ 89 void error( String file, ulong line, String fmt, ... ){
90 std.stdio.writefln( "ERR %s %d: %s", file, line, fmt );
86 } 91 }
87 void fatal( String file, ulong line, String fmt, ... ){ 92 void fatal( String file, ulong line, String fmt, ... ){
93 std.stdio.writefln( "FAT %s %d: %s", file, line, fmt );
88 } 94 }
89 } 95 }
90 } 96 }
91 97
92 private DwtLogger dwtLoggerInstance; 98 private DwtLogger dwtLoggerInstance;