Skip to content

Commit

Permalink
Add comments in example
Browse files Browse the repository at this point in the history
  • Loading branch information
fraxken authored Apr 9, 2018
1 parent 89cffa2 commit 6b5a803
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions nimLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,21 @@ nimLog is all method from Perl SDK API that allow to create and manage a log fil
## Examples

```perl
# Your log (file) name
my $LOGFILE = "probe.log";
nimLogSet($LOGFILE,"prefix - ",5,NIM_LOGF_NOTRUNC);

# Open the nimLog handle
nimLogSet($LOGFILE, "", 5, NIM_LOGF_NOTRUNC);

# Truncate the log file size to 512KB
nimLogTruncateSize(512 * 1024);
nimLog(3,"Hello world!");
nimLog(3,"Hello world!");

# Set the log level to 2
nimLogSetLevel(2);
nimLog(3,"Hello world!"); # Skipped

# Close current log
nimLogClose()
```

Expand Down

0 comments on commit 6b5a803

Please sign in to comment.