Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: updated documentation examples #23

Merged
merged 3 commits into from
May 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ Configure the core logger in your project:

```st
VAR
_coreLogger : TcLogCore(bufferSize := 100 * (Tc2_System.MAX_STRING_LENGTH + Constants.FifoOverhead));
_coreLogger : TcLogLib.TcLogCore(bufferSize := 100 * (Tc2_System.MAX_STRING_LENGTH + TcLogLib.Constants.FifoOverhead));
END_VAR

_coreLogger
.WriteToAds()
.WriteToFile('c:\logs\', 'sensor_data.txt')
.MinimumLevel(LogLevels.Debug)
.MinimumLevel(TcLogLib.LogLevels.Debug)
.RunLogger();
```

Then, maybe in a different POU, use `TcLog` to log messages:

```st
VAR
_logger: TcLog;
_logger: TcLogLib.TcLog;
_myInt : INT := 10;
_myVarInfo : __SYSTEM.VAR_INFO := __VARINFO(_myInt);
END_VAR
Expand Down