Logpoints¶
A logpoint is a special tracepoint that injects a log message into your application. Log messages are logged to the standard out of the application, the agent is running on.
A logpoint can be configured to have conditional rules, and by default logpoints are not disabled after being triggered, but will only fire once every 100ms.
Create a logpoint¶
A logpoint can be created by selecting the 'Logpoint' rule from the available rules.
Now when you create a tracepoint you will be asked for the log message to use. When creating a log message you can use curly braces '{}' to indicate a watcher. This will be interpreted at run time and replaced in the log message.
Example¶
Given this code section:
5 6 7 8 9 |
|
With a logpoint on line 8 you will can use a log message The uuid is {uuid_}.
and the log message will result in The uuid is eac88501-25d6-4a78-8380-856a3cd51d53
.
View Logpoints¶
You can view the logpoints in NerdVision in the 'Log Messages' section, under the code section.
See our blog for more details on using logpoints: Change log messages without restart