Archived

This forum has been archived. Please start a new discussion on GitHub.

Configuring Ice.Plugin.IceLogger on Windows Server

Hi,

The server runs on Windows 2003 as Windows Service.

I am trying to configure IceLogger

This is how I had it in the server.config file. And for obvious reasons (path issue) Ice runtime had trouble initializing it on the windows server.
Ice.Plugin.IceLogger=XYZ.ZeroC.dll:XYZ.ZeroC.IceLoggerPluginFactory

So I took a different approach, I decided to append the path as follows before we call Ice's main function:

.....
var properties = Ice.Util.createProperties();
properties.load(configFile);

var loggerSetting = properties.getProperty("Ice.Plugin.IceLogger");
var newLoggerSetting = string.Format(@{0}\{1}, "C:\AppFolder", loggerSetting);
properties.setProperty("Ice.Plugin.IceLogger", newLoggerSetting);

Ice.InitializationData initializationData = new InitializationData();
initializationData.properties = properties;

Task.Factory.StartNew(() => main(new string[] { }, initializationData)).LogExceptions();
....

This is also not working..

Please advise me on how to configure this Logger on Windows Server (app runs as windows service)

Regards,
Vishwa

Comments

  • xdm
    xdm La Coruña, Spain
    Hi,

    It is difficult to say what is happening without more information. You say that it isn't working, but can you describe what is happening. Is the service failing to start due to a failure loading the plug-in? if that is the case there will be an exception indicating why, if your application is running as a windows service this will typically ends in Windows Viewer but that depends on your service implementation.
    • What Ice version are you using?
    • What language / compiler?
    • Does your application use IceSSL?
  • This isssue is resolved!
    The path needed a double quotes around it as there were spaces in between them.

    Thanks