All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.teambytes.cloudwatch.appenders.logback.CloudwatchSimpleDataAppender.scala Maven / Gradle / Ivy

The newest version!
package com.teambytes.cloudwatch.appenders.logback

import ch.qos.logback.classic.spi.ILoggingEvent

class CloudwatchSimpleDataAppender extends CloudwatchAppender {

  def append(event: ILoggingEvent): Unit = {
    try {
      val message = Option(layout).map(_.doLayout(event)).getOrElse(event.getFormattedMessage)
      sendEvent(message)
    } catch {
      case e: Exception =>
        e.printStackTrace()
        addError("Error while sending a message", e);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy