Package csw.logging.client.appenders
Class FileAppender
java.lang.Object
csw.logging.client.appenders.FileAppender
- All Implemented Interfaces:
LogAppender
An appender that writes log messages to files.
param: system typed Actor System param: stdHeaders the headers that are fixes for this service.
-
Constructor Summary
ConstructorsConstructorDescriptionFileAppender(akka.actor.typed.ActorSystem<?> system, play.api.libs.json.JsObject stdHeaders) -
Method Summary
Modifier and TypeMethodDescriptionvoidWrite the log message to a file.static FileAppenderapply(akka.actor.typed.ActorSystem<?> system, play.api.libs.json.JsObject stdHeaders) Constructor for a file appender.static ZonedDateTimedecideTimestampForFile(ZonedDateTime logDateTime) scala.concurrent.Future<scala.runtime.BoxedUnit>finish()Called just before the logger shuts down.scala.concurrent.Future<scala.runtime.BoxedUnit>stop()Closes the file appender.
-
Constructor Details
-
FileAppender
public FileAppender(akka.actor.typed.ActorSystem<?> system, play.api.libs.json.JsObject stdHeaders)
-
-
Method Details
-
apply
public static FileAppender apply(akka.actor.typed.ActorSystem<?> system, play.api.libs.json.JsObject stdHeaders) Constructor for a file appender.- Parameters:
system- typed Actor System.stdHeaders- the headers that are fixes for this service.- Returns:
- (undocumented)
-
decideTimestampForFile
-
append
Write the log message to a file.- Specified by:
appendin interfaceLogAppender- Parameters:
baseMsg- the message to be logged.category- the kinds of log (for example, "common").
-
finish
public scala.concurrent.Future<scala.runtime.BoxedUnit> finish()Called just before the logger shuts down.- Specified by:
finishin interfaceLogAppender- Returns:
- a future that is completed when finished.
-
stop
public scala.concurrent.Future<scala.runtime.BoxedUnit> stop()Closes the file appender.- Specified by:
stopin interfaceLogAppender- Returns:
- a future that is completed when the close is complete.
-