You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After an EventLogger converts an Event to a string, it should write it to the output (Issue: #69 ). The output could be a file, standard output, or a string (for testing). LogOutput is the object that takes care of writing to the output and exposes the LogLine() method. Since the underlying file might be shared among multiple threads, LogLine() must be synchronized to make sure the logs do not get corrupted.
A sample implementation:
This class provides an abstraction over the output. All the subclasses
must implement `LogLine()` method which receives a string and writes it
to the output.
This PR also contains 2 implementations of `LogOutput`class.
`FileOutput` handles writing into a file and standard output.
`StringOutput` writes to a string and is used for testing.
Fixes: #116
After an
EventLogger
converts anEvent
to a string, it should write it to the output (Issue: #69 ). The output could be a file, standard output, or a string (for testing).LogOutput
is the object that takes care of writing to the output and exposes theLogLine()
method. Since the underlying file might be shared among multiple threads,LogLine()
must be synchronized to make sure the logs do not get corrupted.A sample implementation:
The text was updated successfully, but these errors were encountered: