Skip to content

Commit

Permalink
Fix logger
Browse files Browse the repository at this point in the history
  • Loading branch information
GrimMaple committed Apr 18, 2023
1 parent e18eaa2 commit aeb045e
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions src/dlangide.d
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@ import std.conv;
import dlangide.ui.frame;
import dlangide.ui.commands;
import dlangide.workspace.workspace;
import std.experimental.logger;

static if(__VERSION__ > 2100)
{
import std.logger;
}
else
{
import std.experimental.logger;
}

mixin APP_ENTRY_POINT;

Expand All @@ -26,15 +34,17 @@ extern (C) int UIAppMain(string[] args) {
runParserTests();
}

version(Windows) {
static if(__VERSION__ > 2100) {
debug {
sharedLog = new FileLogger("dcd.log");
sharedLog = cast(shared)new FileLogger("dcd.log");
} else {
sharedLog = new NullLogger();
sharedLog = cast(shared)new NullLogger();
}
} else {
}
else
{
debug {
//sharedLog = new FileLogger("dcd.log");
sharedLog = new FileLogger("dcd.log");
} else {
sharedLog = new NullLogger();
}
Expand Down Expand Up @@ -94,12 +104,12 @@ extern (C) int UIAppMain(string[] args) {
// set window icon
window.windowIcon = drawableCache.getImage("dlangui-logo1");
}

//Widget w = new Widget();
//pragma(msg, w.click.return_t, "", w.click.params_t);

IDEFrame frame = new IDEFrame(window);

// Open project, if it specified in command line
if (args.length > 1)
{
Expand Down

0 comments on commit aeb045e

Please sign in to comment.