Announcement Announcement Module
Collapse
No announcement yet.
Configuring MongoLog4jAppender to work on CloudFoundry Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Configuring MongoLog4jAppender to work on CloudFoundry

    Here's a sample MongoLog4jAppender configuration:
    Code:
    <appender name="MONGO" class="org.springframework.data.document.mongodb.log4j.MongoLog4jAppender">
            <param name="host" value="localhost"/>
            <param name="port" value="27017"/>
            <param name="database" value="logs"/>
            <param name="collectionPattern" value="%X{year}%X{month}"/>
            <param name="applicationId" value="lulu"/>
            <param name="warnOrHigherWriteConcern" value="FSYNC_SAFE"/>
            <layout class="org.apache.log4j.PatternLayout">
                <param name="ConversionPattern" value="%d %p [%c] - %x%m%n"/>
            </layout>
        </appender>
    How can I configure my app so that the values for host and port change to match the cloud environment on CloudFoundry?
Working...
X