Skip to content

Commit 36d6e32

Browse files
committed
added doc for Tcl and Python APIs
1 parent dfcb5fc commit 36d6e32

1 file changed

Lines changed: 18 additions & 2 deletions

File tree

doc/README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,25 @@ The InfoLogger library allows to inject messages directly from programs, as show
213213
214214
Usually, one will only take care of defining the per-message messageOptions struct and a context with appropriate Facility field set, all other being set automatically.
215215
216+
* InfoLogger library is also available for: Tcl, Python.
217+
It allows to log message from scripting languages. A simplified subset of the InfoLogger C++ API is made available through SWIG-generated modules.
218+
Example usage is shown below, launching interactive interpreters from the command line.
216219
217-
218-
220+
* Python example:
221+
```
222+
python
223+
import infoLoggerForPython
224+
logHandle=infoLoggerForPython.InfoLogger()
225+
logHandle.logInfo("This is a test")
226+
logHandle.logError("Something went wrong")
227+
```
228+
* Tcl example:
229+
```
230+
tclsh
231+
load libinfoLoggerForTcl.so
232+
$logHandle logInfo "This is a test"
233+
$logHandle logError "Something went wrong"
234+
```
219235
220236
221237
## Configuration

0 commit comments

Comments
 (0)