Cette page n'est pas encore disponible en français, sa traduction est en cours.
Si vous avez des questions ou des retours sur notre projet de traduction actuel,
n'hésitez pas à nous contacter.
Overview
The Logs integration detects log lines in your source code, displays live event counts directly in the source editor, and provides links to the Datadog Log Explorer to view the logs generated by each log line.
Hover over a log element to see matching log patterns with runtime value ranges. Use this runtime context to understand how your code behaves in production or other deployed environments.
Log queries
Click the log icon to query logs using Datadog:
This launches the Log Explorer and shows the latest log events. The query is prefilled with the environment, log status, logger name, and text elements extracted from your source code:
Use the Datadog platform to inspect individual logs and related traces, or modify the search query to narrow down to the logs that you are most interested in.
Supported languages and frameworks
The Logs integration supports the following languages and logging frameworks:
Settings
Right-click a log element in the source editor to open the settings (Editor → Inlay Hints) for the current language, and to activate or deactivate the feature.
Logger name for Java and Kotlin
In Java and Kotlin, by convention, logs are normally tagged with the logger name corresponding to the fully qualified class name of the class where the logger is created.
In rare cases, users post-process their logs data and modify the logger name tag to use only the simple class name. For these users, there is a Logger name setting to inform the plugin to create Log Explorer queries using the simple class name.
Advanced settings
For a typical setup, the advanced settings are not required. However, if you have log events with a non-standard logger name attribute, you can change the “Logger name tag” setting accordingly. If you set it to blank, the logger name will not be used in log queries at all.
Further reading
Documentation, liens et articles supplémentaires utiles: