munity.farao.gridcapa-core-cc-post-processing-app.1.2.1.source-code.logback.xml Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gridcapa-core-cc-post-processing-app Show documentation
Show all versions of gridcapa-core-cc-post-processing-app Show documentation
GridCapa Core CC post-processing application
<?xml version="1.0" encoding="UTF-8"?> <configuration> <springProperty scope="context" name="rabbitMQHost" source="spring.rabbitmq.host" defaultValue="localhost"/> <springProperty scope="context" name="rabbitMQPort" source="spring.rabbitmq.port" defaultValue="5672"/> <springProperty scope="context" name="rabbitMQUserName" source="spring.rabbitmq.username" defaultValue="guest" /> <springProperty scope="context" name="rabbitMQPassword" source="spring.rabbitmq.password" defaultValue="guest" /> <springProperty scope="context" name="rabbitMQExchangeName" source="logback.amqp.exchange" defaultValue="task-manager-logs-exchange"/> <springProperty scope="context" name="rabbitMQRoutingKey" source="logback.amqp.routing-key" defaultValue="#"/> <springProperty scope="context" name="serviceName" source="spring.application.name" defaultValue="gridcapa-back-end" /> <!-- specific appender to send business events to a rabbitmq exchange--> <appender name="amqp-business-events" class="org.springframework.amqp.rabbit.logback.AmqpAppender"> <!-- Logstash encoder is used as a trick to convert plain text to json --> <encoder class="net.logstash.logback.encoder.LogstashEncoder"> <customFields>{"serviceName": "${serviceName}"}</customFields> <includeContext>false</includeContext> <fieldNames> <timestamp>timestamp</timestamp> <thread>[ignore]</thread> <logger>[ignore]</logger> <version>[ignore]</version> <levelValue>[ignore]</levelValue> </fieldNames> </encoder> <!-- RabbitMQ connection --> <host>${rabbitMQHost}</host> <port>${rabbitMQPort}</port> <username>${rabbitMQUserName}</username> <password>${rabbitMQPassword}</password> <exchangeName>${rabbitMQExchangeName}</exchangeName> <routingKeyPattern>${rabbitMQRoutingKey}</routingKeyPattern> <declareExchange>true</declareExchange> <exchangeType>topic</exchangeType> <generateId>true</generateId> <charset>UTF-8</charset> <durable>true</durable> <deliveryMode>PERSISTENT</deliveryMode> </appender> <!-- appender to display execution logs on console --> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> </encoder> </appender> <!-- This logger name must match Logger's names in java code Do not bind any logger with the appender "amqp-business-events"! You should bind with "amqp-business-events" appender only Loggers you want to see in gridcapa processes as a final user--> <logger name="BUSINESS_LOGGER" additivity="false" level="INFO"> <appender-ref ref="amqp-business-events"/> <appender-ref ref="STDOUT"/> </logger> <root level="INFO"> <appender-ref ref="STDOUT"/> </root> <logger name="com.powsybl" level="OFF"/> <logger name="com.rte_france.powsybl" level="OFF"/> <logger name="com.farao_community.farao.commons" level="ERROR"/> <logger name="com.farao_community.farao.virtual_hubs" level="ERROR"/> </configuration>
© 2015 - 2024 Weber Informatics LLC | Privacy Policy