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
Copy file name to clipboardExpand all lines: doc/README.md
+27-10Lines changed: 27 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -216,26 +216,43 @@ The InfoLogger library allows to inject messages directly from programs, as show
216
216
217
217
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.
218
218
219
-
* InfoLogger library is also available for: Tcl, Python.
219
+
* InfoLogger library is also available for: Tcl, Python, Go.
220
220
It allows to log message from scripting languages. A simplified subset of the InfoLogger C++ API is made available through SWIG-generated modules.
221
-
Example usage is shown below, launching interactive interpreters from the command line.
221
+
Example usage is shown below. Files listed there are available from the infoLogger library installation directory.
222
222
223
-
* Python example:
223
+
* Tcl
224
+
** Library files: infoLoggerForTcl.so
225
+
** Code example: (interactive interpreter from the command line)
226
+
```
227
+
tclsh
228
+
load infoLoggerForTcl.so
229
+
set logHandle [InfoLogger]
230
+
$logHandle logInfo "This is a test"
231
+
$logHandle logError "Something went wrong"
232
+
```
233
+
* Python
234
+
** Library files: _infoLoggerForPython.so and infoLoggerForPython.py
235
+
** Code example: (interactive interpreter from the command line)
224
236
```
225
237
python
226
238
import infoLoggerForPython
227
239
logHandle=infoLoggerForPython.InfoLogger()
228
240
logHandle.logInfo("This is a test")
229
241
logHandle.logError("Something went wrong")
230
242
```
231
-
* Tcl example:
243
+
* Go
244
+
** Library files: infoLoggerForGo.a and infoLoggerForGo.go (to be copied to ${GOPATH}/src/infoLoggerForGo)
245
+
** Build: CGO_LDFLAGS="${GOPATH}/src/infoLoggerForGo/infoLoggerForGo.a -lstdc++" go build
0 commit comments