Skip to content

Commit

Permalink
make hx.doctest.internal.Logger.log function dynamic
Browse files Browse the repository at this point in the history
  • Loading branch information
sebthom committed May 12, 2021
1 parent 5183451 commit eb10ed4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hx/doctest/internal/Logger.hx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Logger {
/**
* @param pos will be automatically populated by Haxe if not specified, see https://haxe.org/manual/debugging-posinfos.html
*/
public static function log(level:Level, msg:String, ?pos:haxe.PosInfos):Void {
public dynamic static function log(level:Level, msg:String, ?pos:haxe.PosInfos):Void {
if (EnumValueTools.getIndex(level) < EnumValueTools.getIndex(Logger.maxLevel))
return;

Expand All @@ -50,7 +50,7 @@ class Logger {
#end

case ERROR:
#if (sys && !hl) // TODO don't write to STDERR on hl, results in strange output for TestRunner#runAndExit()
#if (sys2 && !hl) // TODO don't write to STDERR on hl, results in strange output for TestRunner#runAndExit()
// on sys targets we directly write to STDERR
Sys.stdout().flush();
Sys.stderr().writeString((pos == null ? "" : '${pos.fileName}:${pos.lineNumber}: ') + '$charsOfLine[ERROR] ${msg}${NEW_LINE}');
Expand Down

0 comments on commit eb10ed4

Please sign in to comment.