File logging with IceBox and Java

dougmeredithdougmeredith Member Doug MeredithOrganization: Skyridge Systems Inc.Project: Home automation
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

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    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.
  • dougmeredithdougmeredith Member Doug MeredithOrganization: Skyridge Systems Inc.Project: Home automation
    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
  • dougmeredithdougmeredith Member Doug MeredithOrganization: Skyridge Systems Inc.Project: Home automation
    Incidentally, it might be worth noting this issue in the manual.
  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi Doug,

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

    Mark
Sign In or Register to comment.