Results 1 to 3 of 3

Thread: How do I make log messages go to the correct logs?

  1. #1

    Default How do I make log messages go to the correct logs?

    I have one app "live" that connects to a number of hardware audio encoders via ShoutCast and restreams them. I have another app "vod" serving content from the filesystem via HLS.

    In the former app, none of the ShoutCastReceiver messages are logged to the app-specific logs and instead all end up in the server logs. That means that if any device goes offline, the server logs get spammed with a ShoutCastReceiver.internalConnect info message and a MediaCasterConnection.connect: Failed to connect error message about once a second for every device that's unreachable. That means the server logs can sometimes get thousands of live-specific messages every hour.

    In the latter app, all of the HTTPStreamerAdapterCupertinoStreamer, ModuleMediaReaderNotify, HTTPStreamerSessions, MediaReaderH264Cupertino and other very much app-specific messages end up in both the server logs and the app-specific logs. That means the server logs get thousands of vod-specific messages every hour.

    What I've tried to do is use a RewriteAppender or do something with a Filter attached to the root Appenders (serverError, serverAccess, etc.), but in both cases I'm only able to prevent messages to the server logs. I can't figure out how to correctly intercept and redirect such messages, and the WMSLogger and WMSLoggerFactory classes appear to behave very differently from Logger and LoggerFactory.

    How would I go about making rules for getting log messages to their appropriate logs?

  2. #2


    Hello there.

    If you edit the [install-dir]/conf/ file there is a section that you can uncomment to turn on application level logging, starting around line 73.

    I hope this is helpful.

    Kind regards,


  3. #3


    That just doubles the number of logging messages. That enables the app-specific logs I mentioned.

    The application-specific logs don't get the errors caused by the application that's trying to make the ShoutCast connections. Those messages are all server-level and I can't find a way to filter them out to just the application logs, nor is there a way to limit the messages (by ignoring them if the connection has been steadily down for a while). We don't have any way to reconfigure the server once it's been deployed and there's nothing stopping someone from disconnecting a device that was providing one of the ShoutCast streams and unlisting the multicast channel on endpoints. When that happens, and then we have to download the logs over an expensive and slow satellite connection, I don't really need logs that are 99% the same several messages that have been printed every few seconds over the last several months.

    edit: I guess maybe I could have something else monitoring the connections and removing the configurations from the server automatically when they've been down for a while, but then it becomes an issue of figuring out whether or not a new device has been added to the network.
    Last edited by mtownsend; 07-28-2015 at 04:30 PM.

Similar Threads

  1. Strange messages in error log
    By Lelik1985 in forum General Forum
    Replies: 5
    Last Post: 01-16-2015, 09:01 AM
  2. Replies: 1
    Last Post: 09-24-2012, 03:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts