This projects uses standard SBT layout.
src/main/scala
: Application source code.src/main/scala/logging/Driver
: The application driver (ie. it contains themain
method)src/test/scala
: Testsbuid.sbt
: The main SBT configuration file./project
: Contains SBT configurations.
- Cats
- Monix
- better-files
- ScalaTest (for testing)
This is simply a Scala (2.12) application that uses SBT as its build tool. As such, in order to build and run it, simply
cd
into the top level root directory and run sbt run
from the command line (this assumes you have SBT installed on
your system). Alternative, you should be able to import it into an IDE like IntelliJ which should be able to recognize
SBT. From here you can also run the application using the UI controls.
Driver.scala
showcases the usage of the logger classes.- Makes use of functional programming concepts such as higher-kinded types and type classes for modularity and extensibility.
- The code has been heavily commented to explain the decisions made. Normally, this many comments would not be necessary.
- Supports rolling over files. However this is made transparent to the user. This means that if you want to read/write to a file called "test.txt", for example, you can read/write from/to it using the logger class as if though it was always a single file but behind the scenes, the library will manage rolled over files for you.
- More efficient and compact serialization.
- Provides RPC capabilities.
- Less flexibility since you are now bound to that framework.
- Less flexibility when defining a schema. Must adhere to a set of rules when modifying it.
- More efficient use of disk.
- You incur a performance a hit when reading/writing from/to files due to the constant compression and decompression.