Skip to content

Commit

Permalink
Modify README to include new functionality.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbellgardt committed Jan 26, 2021
1 parent 639d2a9 commit 57051b8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,16 @@ UniLog.Log("Message", "StreamName");
UniLog.LogF("StreamName", "Message %s", *variable);
```

### Send Multiple LogStreams to the Same File

You can simply specify the same file name and file path in multiple LogStreams. The output of both streams will be written to this file. This can be useful to have separate streams for errors or warnings. To distinguish the streams, you can use

```cpp
stream->SetPrefix("Warning: "); // No additional space will be added after the prefix, so make sure to add one if you want that
```
to set a prefix that will automatically be added to every message that is written to the file (this will not show up in the on screen log).
### On Screen Logging
You can also display the log messages on screen. This can even be enabled/disabled during runtime. To do this, use the ILogStream interface:
Expand Down

0 comments on commit 57051b8

Please sign in to comment.