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
ConstructorDescriptionFileAppender
(akka.actor.typed.ActorSystem<?> system, play.api.libs.json.JsObject stdHeaders) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Write the log message to a file.static FileAppender
apply
(akka.actor.typed.ActorSystem<?> system, play.api.libs.json.JsObject stdHeaders) Constructor for a file appender.static ZonedDateTime
decideTimestampForFile
(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:
append
in 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:
finish
in interfaceLogAppender
- Returns:
- a future that is completed when finished.
-
stop
public scala.concurrent.Future<scala.runtime.BoxedUnit> stop()Closes the file appender.- Specified by:
stop
in interfaceLogAppender
- Returns:
- a future that is completed when the close is complete.
-