Handle log files from a result reporter
Stay organized with collections
Save and categorize content based on your preferences.
In some cases, having access to only the test results isn't enough; having
the log files is necessary to complete the overall results.
Log interface
Any result reporter or test event
can have access to the logs by implementing
ILogSaverListener
,
which lets a reporter receive the logs through different callbacks:
testLogSaved
: Called right away when a file is logged. This notifies a
new file has been logged. This is called at any time.
logAssociation
: Called in order with the test events. This ensures a
strong association between the file being logged and the events in progress.
By implementing this interface, the result reporter can have access to the
logged file references and use them.
When to use logAssociation
logAssociation
is a slightly more complicated event as it relies on the
context of the events to be properly interpreted. For example, if the
testStart
has been called, the log from logAssociation
belongs to the test
case in progress.
This strong association allows for correct placement of logs.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-09-23 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{"lastModified": "Last updated 2024-09-23 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-23 UTC."]]