Archived

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

File logging with IceBox and Java

I'm trying to have an IceBox service use a file logger, with no luck. I simply put "Ice.LogFile=log/dummy.txt" in the configuration file for the service, just like I would for a non-IceBox application. In both cases I can find this entry in the communicator's properties, but with IceBox the file isn't created, and logging output continues to go to standard output (or maybe standard error, I didn't check).

I assume there is something I am missing about how communicators are created and default loggers are set with IceBox. Any thoughts?

Comments

  • benoit
    benoit Rennes, France
    Hi,

    It's indeed currently not possible to use a file logger for a specific service of an IceBox server. The reason is that the IceBox server always provides a logger to each of its services and this logger takes precedence over the Ice.LogFile property.

    If you set the Ice.LogFile property in the IceBox configuration file, the services hosted by the IceBox server will log to this file and each service will use a specific prefix for the logging allowing you to identify from this service the trace is coming from. Perhaps this will be sufficient for your needs?

    In any case, we'll discuss this and see if this can be improved. Thanks for bringing this to our attention!

    Cheers,
    Benoit.
  • Hi Benoit,

    Thanks for the response. I tried that and it works fine; we'll see if we can use this approach to logging.

    Doug
  • Incidentally, it might be worth noting this issue in the manual.
  • mes
    mes California
    Hi Doug,

    Thanks for the suggestion, I've added a note to the docs.

    Mark