New Posts New Posts RSS Feed: Trouble with Programmatic Configuration
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Trouble with Programmatic Configuration

 Post Reply Post Reply
Author
jradxl View Drop Down
Newbie
Newbie


Joined: 14-Jun-2011
Posts: 30
Post Options Post Options   Quote jradxl Quote  Post ReplyReply Direct Link To This Post Topic: Trouble with Programmatic Configuration
    Posted: 26-Aug-2011 at 1:08pm
Many thanks for the quick response.
I now have logging redirected via NLog

But I think your documentation is missleading.
It describes how the IdeaBlade.Instance can be used to set the configuration, if done early enough before any Entity is requested. And, there does not need to be a setter on LogFile if it can never be set.

thanks
John


http://drc.ideablade.com/xwiki/bin/view/Documentation/deploy-configuration
Section: Configuration contents and defaults, Logging in table

Back to Top
robertg View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 15-Mar-2011
Location: California
Posts: 87
Post Options Post Options   Quote robertg Quote  Post ReplyReply Direct Link To This Post Posted: 26-Aug-2011 at 10:36am
Yeah, it's as I thought... by the time IdeaBlade.Instance is constructed, logging has already started. In your case, it sounds like you may want to implement your own custom logger, instead of using this default logger on the client side. You can find information on doing this in the DRC, at http://drc.ideablade.com/xwiki/bin/view/Documentation/custom-logger.
 
-- Robert
Back to Top
jradxl View Drop Down
Newbie
Newbie


Joined: 14-Jun-2011
Posts: 30
Post Options Post Options   Quote jradxl Quote  Post ReplyReply Direct Link To This Post Posted: 26-Aug-2011 at 10:31am
Hi,
Mainly because I'm 2-tier and I don't want the user to fiddle with the *.exe.config.
Probably I can compromise with an embedded App.config, but that still means I cannot turn it off.
I did role back to 6.1.0.0 but it has the same symptoms.

I'm convinced that your documentation suggests this is a feature.


thanks
John

Back to Top
robertg View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 15-Mar-2011
Location: California
Posts: 87
Post Options Post Options   Quote robertg Quote  Post ReplyReply Direct Link To This Post Posted: 26-Aug-2011 at 9:42am
John,
 
I'll look into this. I'm not sure if it's a bug, or just an infelicity based on design limitation. Is there a reason you can't make the change in the App.config?
 
Yours,
Robert
Back to Top
jradxl View Drop Down
Newbie
Newbie


Joined: 14-Jun-2011
Posts: 30
Post Options Post Options   Quote jradxl Quote  Post ReplyReply Direct Link To This Post Posted: 26-Aug-2011 at 4:32am
Hi,
I think this is a bug! (Not responding to a programmatic change to LogFile)
Since ShouldLogSqlQueries and EdmKeys work fine, why does LogFile do nothing?
            var config = IdeaBlade.Core.IdeaBladeConfig.Instance;
            config.Logging.LogFile = @".\MyLogFile.xml";
            config.Logging.ShouldLogSqlQueries = true;
            var keys = config.EdmKeys;
            keys.Add(...);
thanks
John

Back to Top
jradxl View Drop Down
Newbie
Newbie


Joined: 14-Jun-2011
Posts: 30
Post Options Post Options   Quote jradxl Quote  Post ReplyReply Direct Link To This Post Posted: 25-Aug-2011 at 4:47pm
Hi,
I've got a problem with basic programmatic configuration.
I've gone back to a Console App, and set the LogFile property to "", but it doesn't turnoff the Logfile.
Setting it to some filename doesn't work either.

        public static void Main(string[] args)
        {
            var config = IdeaBlade.Core.IdeaBladeConfig.Instance;
            config.Logging.LogFile = ""// @"MyLogFile.xml";

Any suggestions?
thanks
John

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down